Jazz 1.25.+
Loading...
Searching...
No Matches
data_spaces.h
1/* Jazz (c) 2018-2025 kaalam.ai (The Authors of Jazz), using (under the same license):
2
3 1. Biomodelling - The AATBlockQueue class (c) Jacques BasaldĂșa, 2009-2012 licensed
4 exclusively for the use in the Jazz server software.
5
6 Copyright 2009-2012 Jacques BasaldĂșa
7
8 2. BBVA - Jazz: A lightweight analytical web server for data-driven applications.
9
10 Copyright 2016-2017 Banco Bilbao Vizcaya Argentaria, S.A.
11
12 This product includes software developed at
13
14 BBVA (https://www.bbva.com/)
15
16 3. LMDB, Copyright 2011-2017 Howard Chu, Symas Corp. All rights reserved.
17
18 Licensed under http://www.OpenLDAP.org/license.html
19
20
21 Licensed under the Apache License, Version 2.0 (the "License");
22 you may not use this file except in compliance with the License.
23 You may obtain a copy of the License at
24
25 http://www.apache.org/licenses/LICENSE-2.0
26
27 Unless required by applicable law or agreed to in writing, software
28 distributed under the License is distributed on an "AS IS" BASIS,
29 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
30 See the License for the specific language governing permissions and
31 limitations under the License.
32*/
33
34
35#include "src/jazz_bebop/space.h"
36
37#if defined CATCH_TEST
38#ifndef INCLUDED_JAZZ_CATCH2
39#define INCLUDED_JAZZ_CATCH2
40
41#include "src/catch2/catch.hpp"
42
43#endif
44#endif
45
46
47#ifndef INCLUDED_JAZZ_BEBOP_DATA_SPACE
48#define INCLUDED_JAZZ_BEBOP_DATA_SPACE
49
50
57namespace jazz_bebop
58{
59
60#define DATASPACE_INDEX_ROW_NUM 1
61#define DATASPACE_INDEX_KEY 2
62#define DATASPACE_INDEX_EMBEDDING 3
63
64
68class DataSpaces : public Service {
69
70 public:
71
73
74 virtual StatusCode start();
75 virtual pChar const id();
76
77 // Space interface
78
79//TODO: This is similar but not quite identical, since it has a FROM predicate
80
81 // virtual StatusCode load_meta();
82 // virtual StatusCode save_meta();
83 // virtual RowNumber num_rows();
84 // virtual void* get_index_data(RowNumber row);
85 // virtual int num_cols();
86 // virtual pName col_name(int col);
87 // virtual int col_index(pName name);
88 // virtual pLocator locator(RowNumber row, int col, int &index);
89 // virtual pRowSelection where(pChar query);
90 // virtual StatusCode get_row(pTransaction &p_txn, RowNumber row, pColSelection cols = nullptr, pCaster cast = nullptr);
91
92 // DataSpaces-ETL interface
93
94//TODO: Define the DataSpaces-ETL interface. This is understood by the Bop compiler and is used by ETL maintenance software that writes
95// special Bop scripts to populate/update/destroy the DataSpaces.
96
97 private:
98
101};
103
104} // namespace jazz_bebop
105
106#endif // ifndef INCLUDED_JAZZ_BEBOP_DATA_SPACE
BaseAPI: The parent of API and Core.
Definition base_api.h:121
DataSpaces: The data space.
Definition data_spaces.h:68
virtual StatusCode start()
Definition data_spaces.cpp:59
pBaseAPI p_api
A pointer to the BaseAPI that provides access to containers.
Definition data_spaces.h:99
virtual pChar const id()
Definition data_spaces.cpp:85
Name storage_ent
The name of the storage entity (Typically an lmdb database with the metadata of all DataSpaces).
Definition data_spaces.h:100
A Jazz Service is a globally instanced configurable object that may allocate RAM.
Definition utils.h:285
A language to access any container by base using locators.
Definition base_api.cpp:39
DataSpaces * pDataSpace
A pointer to a DataSpaces.
Definition data_spaces.h:102
char * pChar
A pointer to a char buffer.
Definition types.h:185
char Name[NAME_SIZE]
A short identifier used in Blocks, Containers and API.
Definition types.h:183
int StatusCode
Type returned by the Service API.
Definition utils.h:141