LiteCore
Couchbase Lite cross-platform core implementation
Loading...
Searching...
No Matches
c4PredictiveQuery.h
Go to the documentation of this file.
1//
2// c4PredictiveQuery.h
3//
4// Copyright 2018-Present Couchbase, Inc.
5//
6// Use of this software is governed by the Business Source License included
7// in the file licenses/BSL-Couchbase.txt. As of the Change Date specified
8// in that file, in accordance with the Business Source License, use of this
9// software will be governed by the Apache License, Version 2.0, included in
10// the file licenses/APL2.txt.
11//
12
13#pragma once
14#include "c4Base.h"
15#include "fleece/FLBase.h"
16
19
56typedef struct {
60
78 C4SliceResult (*prediction)(void* C4NULLABLE context, FLDict input, C4Database* database,
79 C4Error* C4NULLABLE error);
80
82 void (*C4NULLABLE unregistered)(void* context);
84
89
92
93
#define CBL_CORE_API
Definition c4Compat.h:134
#define C4NULLABLE
Definition c4Compat.h:38
#define C4API
Definition c4Compat.h:114
#define C4_ASSUME_NONNULL_BEGIN
Definition c4Compat.h:36
#define C4API_END_DECLS
Definition c4Compat.h:116
#define C4API_BEGIN_DECLS
Definition c4Compat.h:115
#define C4_ASSUME_NONNULL_END
Definition c4Compat.h:37
FLSliceResult C4SliceResult
Definition c4Base.h:51
struct C4Database C4Database
Opaque handle to an opened database.
Definition c4Base.h:136
CBL_CORE_API void c4pred_registerModel(const char *name, C4PredictiveModel)
Registers a predictive model, under a name.
CBL_CORE_API bool c4pred_unregisterModel(const char *name)
Unregisters whatever model was last registered with this name.
const struct _FLDict * FLDict
A reference to a dictionary (map) value.
Definition FLBase.h:37
An error value.
Definition c4Error.h:133
Configuration struct for registering a predictive model.
Definition c4PredictiveQuery.h:56
void * context
A pointer to any external data needed by the prediction callback, which will receive this as its firs...
Definition c4PredictiveQuery.h:59