Skip to content

Fixed enums naming #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions Sources/SQLite/Typed/AggregateFunctions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// THE SOFTWARE.
//

private enum Functions: String {
private enum Function: String {
case count
case max
case min
Expand Down Expand Up @@ -61,7 +61,7 @@ extension ExpressionType where UnderlyingType : Value {
/// - Returns: A copy of the expression wrapped with the `count` aggregate
/// function.
public var count: Expression<Int> {
return Functions.count.wrap(self)
return Function.count.wrap(self)
}

}
Expand Down Expand Up @@ -92,7 +92,7 @@ extension ExpressionType where UnderlyingType : _OptionalType, UnderlyingType.Wr
/// - Returns: A copy of the expression wrapped with the `count` aggregate
/// function.
public var count: Expression<Int> {
return Functions.count.wrap(self)
return Function.count.wrap(self)
}

}
Expand All @@ -109,7 +109,7 @@ extension ExpressionType where UnderlyingType : Value, UnderlyingType.Datatype :
/// - Returns: A copy of the expression wrapped with the `max` aggregate
/// function.
public var max: Expression<UnderlyingType?> {
return Functions.max.wrap(self)
return Function.max.wrap(self)
}

/// Builds a copy of the expression wrapped with the `min` aggregate
Expand All @@ -122,7 +122,7 @@ extension ExpressionType where UnderlyingType : Value, UnderlyingType.Datatype :
/// - Returns: A copy of the expression wrapped with the `min` aggregate
/// function.
public var min: Expression<UnderlyingType?> {
return Functions.min.wrap(self)
return Function.min.wrap(self)
}

}
Expand All @@ -139,7 +139,7 @@ extension ExpressionType where UnderlyingType : _OptionalType, UnderlyingType.Wr
/// - Returns: A copy of the expression wrapped with the `max` aggregate
/// function.
public var max: Expression<UnderlyingType> {
return Functions.max.wrap(self)
return Function.max.wrap(self)
}

/// Builds a copy of the expression wrapped with the `min` aggregate
Expand All @@ -152,7 +152,7 @@ extension ExpressionType where UnderlyingType : _OptionalType, UnderlyingType.Wr
/// - Returns: A copy of the expression wrapped with the `min` aggregate
/// function.
public var min: Expression<UnderlyingType> {
return Functions.min.wrap(self)
return Function.min.wrap(self)
}

}
Expand All @@ -169,7 +169,7 @@ extension ExpressionType where UnderlyingType : Value, UnderlyingType.Datatype :
/// - Returns: A copy of the expression wrapped with the `min` aggregate
/// function.
public var average: Expression<Double?> {
return Functions.avg.wrap(self)
return Function.avg.wrap(self)
}

/// Builds a copy of the expression wrapped with the `sum` aggregate
Expand All @@ -182,7 +182,7 @@ extension ExpressionType where UnderlyingType : Value, UnderlyingType.Datatype :
/// - Returns: A copy of the expression wrapped with the `min` aggregate
/// function.
public var sum: Expression<UnderlyingType?> {
return Functions.sum.wrap(self)
return Function.sum.wrap(self)
}

/// Builds a copy of the expression wrapped with the `total` aggregate
Expand All @@ -195,7 +195,7 @@ extension ExpressionType where UnderlyingType : Value, UnderlyingType.Datatype :
/// - Returns: A copy of the expression wrapped with the `min` aggregate
/// function.
public var total: Expression<Double> {
return Functions.total.wrap(self)
return Function.total.wrap(self)
}

}
Expand All @@ -212,7 +212,7 @@ extension ExpressionType where UnderlyingType : _OptionalType, UnderlyingType.Wr
/// - Returns: A copy of the expression wrapped with the `min` aggregate
/// function.
public var average: Expression<Double?> {
return Functions.avg.wrap(self)
return Function.avg.wrap(self)
}

/// Builds a copy of the expression wrapped with the `sum` aggregate
Expand All @@ -225,7 +225,7 @@ extension ExpressionType where UnderlyingType : _OptionalType, UnderlyingType.Wr
/// - Returns: A copy of the expression wrapped with the `min` aggregate
/// function.
public var sum: Expression<UnderlyingType> {
return Functions.sum.wrap(self)
return Function.sum.wrap(self)
}

/// Builds a copy of the expression wrapped with the `total` aggregate
Expand All @@ -238,15 +238,15 @@ extension ExpressionType where UnderlyingType : _OptionalType, UnderlyingType.Wr
/// - Returns: A copy of the expression wrapped with the `min` aggregate
/// function.
public var total: Expression<Double> {
return Functions.total.wrap(self)
return Function.total.wrap(self)
}

}

extension ExpressionType where UnderlyingType == Int {

static func count(_ star: Star) -> Expression<UnderlyingType> {
return Functions.count.wrap(star(nil, nil))
return Function.count.wrap(star(nil, nil))
}

}
Expand Down
Loading