Skip to content

Commit

Permalink
Minor fix documentation for some layout issues in docc.
Browse files Browse the repository at this point in the history
  • Loading branch information
liuliu committed Jun 5, 2022
1 parent 2ca4588 commit a9e8e1f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 35 deletions.
38 changes: 19 additions & 19 deletions src/Publisher.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,31 +35,31 @@
open class QueryPublisherBuilder<Element: Atom & Equatable> {
public init() {}
/**
* Subscribe to a query against the Workspace. This is coupled with `publisher(for: Element.self)` method
* and shouldn't be used independently.
*
* - Parameters:
* - query: The query such as `Post.title == "some title" && Post.color == .red`
* - limit: The limit. Default to `.noLimit`, you can supply `.limit(number)`
* - orderBy: The array of keys to order the result. Such as `[Post.priority.descending]`
*
* - Returns: A publisher object that can be interacted with Combine.
*/
* Subscribe to a query against the Workspace. This is coupled with `publisher(for: Element.self)` method
* and shouldn't be used independently.
*
* - Parameters:
* - query: The query such as `Post.title == "some title" && Post.color == .red`
* - limit: The limit. Default to `.noLimit`, you can supply `.limit(number)`
* - orderBy: The array of keys to order the result. Such as `[Post.priority.descending]`
*
* - Returns: A publisher object that can be interacted with Combine.
*/
open func `where`<T: Expr & SQLiteExpr>(
_ query: T, limit: Limit = .noLimit, orderBy: [OrderBy<Element>] = []
) -> QueryPublisher<Element> where T.ResultType == Bool, T.Element == Element {
fatalError()
}
/**
* Subscribe to all changes to a class. This is coupled with `publisher(for: Element.self)` method
* and shouldn't be used independently.
*
* - Parameters:
* - limit: The limit. Default to `.noLimit`, you can supply `.limit(number)`
* - orderBy: The array of keys to order the result. Such as `[Post.priority.descending]`
*
* - Returns: A publisher object that can be interacted with Combine.
*/
* Subscribe to all changes to a class. This is coupled with `publisher(for: Element.self)` method
* and shouldn't be used independently.
*
* - Parameters:
* - limit: The limit. Default to `.noLimit`, you can supply `.limit(number)`
* - orderBy: The array of keys to order the result. Such as `[Post.priority.descending]`
*
* - Returns: A publisher object that can be interacted with Combine.
*/
open func all(limit: Limit = .noLimit, orderBy: [OrderBy<Element>] = []) -> QueryPublisher<
Element
> {
Expand Down
32 changes: 16 additions & 16 deletions src/Workspace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -169,27 +169,27 @@ public protocol Workspace: Queryable {
#endif
#if compiler(>=5.5) && canImport(_Concurrency)
/**
* Subscribe to changes to the said object, and return the AsyncSequence you can iterate over.
*
* - Parameters:
* - object: The object previously fetched that we want to observe the new updates.
* - bufferingPolicy: The buffering policy to avoid issuing all updates to concerned parties. Default will be the newest of 1.
*
* - Returns: An AsyncSequence that can await for new object updates. Finishes only if the object deletes.
*/
* Subscribe to changes to the said object, and return the AsyncSequence you can iterate over.
*
* - Parameters:
* - object: The object previously fetched that we want to observe the new updates.
* - bufferingPolicy: The buffering policy to avoid issuing all updates to concerned parties. Default will be the newest of 1.
*
* - Returns: An AsyncSequence that can await for new object updates. Finishes only if the object deletes.
*/
@available(macOS 12.0, iOS 15.0, tvOS 15.0, watchOS 8.0, *)
func subscribe<Element: Atom & Equatable>(
object: Element, bufferingPolicy: AsyncStream<Element>.Continuation.BufferingPolicy
) -> AsyncStream<Element>
/**
* Subscribe to changes to the said fetched result, and return the AsyncSequence you can iterate over.
*
* - Parameters:
* - fetchedResult: The result fetched that we want to observe the new updates.
* - bufferingPolicy: The buffering policy to avoid issuing all updates to concerned parties. Default will be the newest of 1.
*
* - Returns: An AsyncSequence that can await for new fetched result. It never finishes.
*/
* Subscribe to changes to the said fetched result, and return the AsyncSequence you can iterate over.
*
* - Parameters:
* - fetchedResult: The result fetched that we want to observe the new updates.
* - bufferingPolicy: The buffering policy to avoid issuing all updates to concerned parties. Default will be the newest of 1.
*
* - Returns: An AsyncSequence that can await for new fetched result. It never finishes.
*/
@available(macOS 12.0, iOS 15.0, tvOS 15.0, watchOS 8.0, *)
func subscribe<Element: Atom & Equatable>(
fetchedResult: FetchedResult<Element>,
Expand Down

0 comments on commit a9e8e1f

Please sign in to comment.