Skip to content

Commit

Permalink
(PORT) CBL-5365: Remove CBLErrors.h from Swift Public API (#3271) (#3273
Browse files Browse the repository at this point in the history
)

* import private module defined in modulemap

* check for errors using swift definitions instead of obj-c
  • Loading branch information
velicuvlad authored Apr 22, 2024
1 parent 7137f26 commit d491d13
Show file tree
Hide file tree
Showing 67 changed files with 134 additions and 78 deletions.
1 change: 1 addition & 0 deletions Swift/ArrayExpressionSatisfies.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/* internal */ enum QuantifiesType {
case any, anyAndEvery, every
Expand Down
1 change: 1 addition & 0 deletions Swift/ArrayFunction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Array function factory.
public final class ArrayFunction {
Expand Down
1 change: 1 addition & 0 deletions Swift/ArrayObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private


/// ArrayProtocol defines a set of methods for readonly accessing array data.
Expand Down
1 change: 1 addition & 0 deletions Swift/Authenticator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Authenticator objects provide server authentication credentials to the replicator.
/// Authenticator is a base opaque protocol; you must instantiate one of
Expand Down
1 change: 1 addition & 0 deletions Swift/Blob.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Blob contains arbitrary binary data, tagged with a MIME type.
/// Blobs can be arbitrarily large, and their data is loaded only on demand (when the `content`
Expand Down
1 change: 1 addition & 0 deletions Swift/Collation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Collation defines how strings are compared and is used when creating a COLLATE expression.
/// The COLLATE expression can be used in the WHERE clause when comparing two strings or in the
Expand Down
1 change: 1 addition & 0 deletions Swift/Collection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// A `Collection` represent a collection which is a container for documents.
///
Expand Down
1 change: 1 addition & 0 deletions Swift/CollectionConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// The collection configuration that can be configured specifically for the replication.
public struct CollectionConfiguration {
Expand Down
1 change: 1 addition & 0 deletions Swift/Conflict.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Conflict class
public struct Conflict {
Expand Down
1 change: 1 addition & 0 deletions Swift/ConflictResolver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Conflict Resolver protocol
public protocol ConflictResolverProtocol {
Expand Down
1 change: 1 addition & 0 deletions Swift/ConsoleLogger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Console logger for writing log messages to the system console.

Expand Down
2 changes: 0 additions & 2 deletions Swift/CouchbaseLiteSwift.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,3 @@ FOUNDATION_EXPORT double CouchbaseLiteSwiftVersionNumber;

//! Project version string for CouchbaseLiteSwift.
FOUNDATION_EXPORT const unsigned char CouchbaseLiteSwiftVersionString[];

#import "CBLErrors.h"
1 change: 1 addition & 0 deletions Swift/DataConverter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/* internal */ class DataConverter {

Expand Down
1 change: 1 addition & 0 deletions Swift/DataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private


/// A query data source. used for specifiying the data source for your query.
Expand Down
1 change: 1 addition & 0 deletions Swift/Database.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Concurruncy control type used when saving or deleting a document.
///
Expand Down
1 change: 1 addition & 0 deletions Swift/DatabaseConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private


/// Configuration for opening a database.
Expand Down
1 change: 1 addition & 0 deletions Swift/DictionaryObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private


/// DictionaryProtocol defines a set of methods for readonly accessing dictionary data.
Expand Down
1 change: 1 addition & 0 deletions Swift/Document.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Couchbase Lite document. The Document is immutable.
public class Document : DictionaryProtocol, Equatable, Hashable, Sequence {
Expand Down
1 change: 1 addition & 0 deletions Swift/DocumentFragment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// DocumentFragment provides access to a document object. DocumentFragment also provides
/// subscript access by either key or index to the data values of the document which are
Expand Down
1 change: 1 addition & 0 deletions Swift/Endpoint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Replication target endpoint.
public protocol Endpoint {
Expand Down
1 change: 1 addition & 0 deletions Swift/Errors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@


import Foundation
import CouchbaseLiteSwift_Private

public struct CBLError {
public static let domain = CBLErrorDomain
Expand Down
1 change: 1 addition & 0 deletions Swift/Expression.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Query expression.
public protocol ExpressionProtocol {
Expand Down
1 change: 1 addition & 0 deletions Swift/FileLogger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// File logger used for writing log messages to files. To enable the file logger,
/// setup the log file configuration and specify the log level as desired.
Expand Down
1 change: 1 addition & 0 deletions Swift/Fragment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// FragmentProtocol provides readonly access to the data value wrapped by a fragment object.
public protocol FragmentProtocol {
Expand Down
1 change: 1 addition & 0 deletions Swift/From.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// A From component representing a FROM clause for specifying the data source of the query.
public final class From: Query, JoinRouter, WhereRouter, GroupByRouter, OrderByRouter, LimitRouter {
Expand Down
1 change: 1 addition & 0 deletions Swift/FullTextExpression.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Full-text expression.
@available(*, deprecated, message: "Use FullTextFunction.match(indexName: String, query: String) instead.")
Expand Down
1 change: 1 addition & 0 deletions Swift/FullTextFunction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Full-text function factory.
public final class FullTextFunction {
Expand Down
1 change: 1 addition & 0 deletions Swift/FullTextIndexExpression.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Index Expression.
public protocol IndexExpressionProtocol { }
Expand Down
1 change: 1 addition & 0 deletions Swift/Function.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Function factory.
public final class Function {
Expand Down
1 change: 1 addition & 0 deletions Swift/GroupBy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// A GroupBy represents the GROUP BY clause to group the query result.
/// The GROUP BY clause is normally used with aggregate functions (AVG, COUNT, MAX, MIN, SUM)
Expand Down
1 change: 1 addition & 0 deletions Swift/Having.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Having represents a HAVING clause of the query statement used for filtering the aggregated
/// values from the the GROUP BY clause.
Expand Down
1 change: 1 addition & 0 deletions Swift/Index.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Index protocol.
public protocol Index { }
Expand Down
1 change: 1 addition & 0 deletions Swift/IndexConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Configuration for creating indexes.
public protocol IndexConfiguration { }
Expand Down
1 change: 1 addition & 0 deletions Swift/Join.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Join component representing a JOIN clause in the query statement.
public protocol JoinProtocol {
Expand Down
1 change: 1 addition & 0 deletions Swift/Joins.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// A Joins component represents a collection of the joins clauses of the query statement.
public final class Joins: Query, WhereRouter, OrderByRouter, LimitRouter {
Expand Down
1 change: 1 addition & 0 deletions Swift/Limit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// A Limit component represents the LIMIT clause of the query statement.
public final class Limit: Query {
Expand Down
1 change: 1 addition & 0 deletions Swift/ListenerToken.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Listener token returned when adding a change listener. The token is used
/// for removing the added change listener.
Expand Down
1 change: 1 addition & 0 deletions Swift/Log.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Log allows to configure console and file logger or to set a custom logger.
public class Log {
Expand Down
1 change: 1 addition & 0 deletions Swift/LogFileConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Log file configuration.
public class LogFileConfiguration {
Expand Down
1 change: 1 addition & 0 deletions Swift/Meta.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Meta expression.
public protocol MetaExpressionProtocol: ExpressionProtocol {
Expand Down
1 change: 1 addition & 0 deletions Swift/MutableArrayObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private


/** MutableArrayProtocol protocol defines a set of methods for getting and setting array data. */
Expand Down
1 change: 1 addition & 0 deletions Swift/MutableDictionaryObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// MutableDictionaryProtocol defines a set of methods for getting and setting
/// dictionary data.
Expand Down
1 change: 1 addition & 0 deletions Swift/MutableDocument.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// A mutable version of the Document.
public final class MutableDocument : Document, MutableDictionaryProtocol {
Expand Down
1 change: 1 addition & 0 deletions Swift/MutableFragment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// MutableFragmentProtocol provides read and write access to the data value
/// wrapped by a fragment object.
Expand Down
1 change: 1 addition & 0 deletions Swift/OrderBy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// An OrderBy represents an ORDER BY clause of the query statement.
public final class OrderBy: Query, LimitRouter {
Expand Down
1 change: 1 addition & 0 deletions Swift/Ordering.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// Ordering represents a single ordering component in the query ORDER BY clause.
public protocol OrderingProtocol {
Expand Down
1 change: 1 addition & 0 deletions Swift/Parameters.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private


/// Query parameters used for setting values to the query parameters defined in the query.
Expand Down
1 change: 1 addition & 0 deletions Swift/PropertyExpression.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private


/// Property expression.
Expand Down
1 change: 1 addition & 0 deletions Swift/Query.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private

/// A database query.
/// A Query instance can be constructed by calling one of the select class methods.
Expand Down
1 change: 1 addition & 0 deletions Swift/Replicator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//

import Foundation
import CouchbaseLiteSwift_Private


/// A replicator for replicating document changes between a local database and a target database.
Expand Down
Loading

0 comments on commit d491d13

Please sign in to comment.