Skip to content

Commit

Permalink
Improve doc comment
Browse files Browse the repository at this point in the history
...
  • Loading branch information
helje5 committed Nov 12, 2024
1 parent 4eae62c commit 312cf43
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions Sources/ZeeQL/Access/AccessDataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,37 @@
// ZeeQL
//
// Created by Helge Hess on 24/02/17.
// Copyright © 2017-2020 ZeeZide GmbH. All rights reserved.
// Copyright © 2017-2024 ZeeZide GmbH. All rights reserved.
//

/**
* This class has a set of operations targetted at SQL based applications. It
* has three major subclasses with specific characteristics:
*
* - `DatabaseDataSource`
* - `ActiveDataSource`
* - `AdaptorDataSource`
* - ``DatabaseDataSource``
* - ``ActiveDataSource``
* - ``AdaptorDataSource``
*
* All of those datasources are very similiar in the operations they provide,
* but they differ in the feature set and overhead.
*
* `DatabaseDataSource` works on top of an `EditingContext`. It has the biggest
* overhead but provides features like object uniquing/registry. Eg if you need
* to fetch a bunch of objects and then perform subsequent processing on them
* (for example permission checks), it is convenient because the context
* remembers the fetched objects. This datasource returns DatabaseObject's as
* specified in the associated Model.
* ``DatabaseDataSource`` works on top of an ``ObjectTrackingContext``.
* It has the biggest overhead but provides features like object
* uniquing/registry.
* Eg if you need to fetch a bunch of objects and then perform subsequent
* processing on them (for example permission checks), it is convenient because
* the context remembers the fetched objects.
* This datasource returns ``DatabaseObject``'s as specified in the associated
* Model.
*
* `ActiveDataSource` is similiar to `DatabaseDataSource`, but it directly works
* on a channel. It has a reasonably small overhead and still provides a good
* feature set, like object mapping or prefetching.
* ``ActiveDataSource`` is similiar to ``DatabaseDataSource``, but it directly
* works on an ``DatabaseChannel``.
* It has a reasonably small overhead and still provides a good feature set,
* like object mapping or prefetching.
*
* Finally `AdaptorDataSource`. This datasource does not perform object mapping,
* that is, it returns `AdaptorRecord` objects and works directly on top of an
* `AdaptorChannel`.
* Finally ``AdaptorDataSource``. This datasource does not perform object
* mapping, that is, it returns ``AdaptorRecord`` objects and works directly on
* top of an ``AdaptorChannel``.
*/
open class AccessDataSource<Object: SwiftObject> : DataSource<Object> {

Expand Down

0 comments on commit 312cf43

Please sign in to comment.