Qore CdsRestDataProvider Module Reference  1.0.0
CdsEntityDataProvider.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
25 namespace CdsRestDataProvider {
30  hash<string, AbstractDataField> record_type;
31 
33  hash<string, string> field_types;
34 
36  hash<string, bool> date_time_fields;
37 
39  string key;
40 
43 }
44 
46 class CdsEntityDataProvider : public DataProvider::AbstractDataProvider {
47 
48 public:
50  CdsRestClient::CdsRestClient rest;
51 
53  string name;
54 
56  hash<auto> meta;
57 
58 protected:
60  hash<CdsRestRecordInfo> record_info();
61 
62 public:
63 
65  constructor(CdsRestClient rest, string name, hash<auto> meta);
66 
67 
69  string getName();
70 
71 
72 protected:
73  *hash<string, DataProvider::AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
74 public:
75 
76 
78 
83 protected:
84  DataProvider::AbstractDataProviderRecordIterator searchRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
85 public:
86 
87 
89 protected:
90  hash<DataProvider::DataProviderInfo> getStaticInfoImpl();
91 public:
92 
93 
95 
103 protected:
104  *hash<auto> createRecordImpl(hash<auto> rec, *hash<auto> create_options);
105 public:
106 
107 
109 
114 protected:
115  string upsertRecordImpl(hash<auto> rec, *hash<auto> upsert_options);
116 public:
117 
118 
120 
126 protected:
127  int updateRecordsImpl(hash<auto> set, hash<auto> where_cond, *hash<auto> search_options);
128 public:
129 
130 
132 
138 protected:
139  int deleteRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
140 public:
141 
142 
144 protected:
145  updateSingleRecord(string id, hash<auto> set);
146 public:
147 
148 
150 protected:
151  deleteSingleRecord(string id);
152 public:
153 
154 
156 protected:
158 public:
159 
160 
162 protected:
164 public:
165 
166 };
167 }
int deleteRecordsImpl(*hash< auto > where_cond, *hash< auto > search_options)
Deletes zero or more records.
string name
current object name
Definition: CdsEntityDataProvider.qc.dox.h:53
hashdecl CdsRestRecordInfo
contains Cds object record information
Definition: CdsEntityDataProvider.qc.dox.h:28
hash< DataProvider::DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
getRecordInfoIntern()
Retrieves the record type.
hash< string, string > field_types
The original field type names.
Definition: CdsEntityDataProvider.qc.dox.h:33
constructor(CdsRestClient rest, string name, hash< auto > meta)
Creates the object from the arguments.
int updateRecordsImpl(hash< auto > set, hash< auto > where_cond, *hash< auto > search_options)
Updates zero or more records matching the search options.
string key
Key field, if any.
Definition: CdsEntityDataProvider.qc.dox.h:39
CdsRestClient::CdsRestClient rest
The REST client object for API calls.
Definition: CdsEntityDataProvider.qc.dox.h:50
updateSingleRecord(string id, hash< auto > set)
updates a single record
Qore CdsRestDataProvider module definition.
Definition: CdsEntityDataProvider.qc.dox.h:26
hash< auto > meta
metadata description
Definition: CdsEntityDataProvider.qc.dox.h:56
DataProvider::AbstractDataProviderRecordIterator searchRecordsImpl(*hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
The CdsEntityDataProvider data provider class.
Definition: CdsEntityDataProvider.qc.dox.h:46
string upsertRecordImpl(hash< auto > rec, *hash< auto > upsert_options)
Upserts the given record to the data provider.
hash< string, bool > date_time_fields
Hash of date/time fields for this record.
Definition: CdsEntityDataProvider.qc.dox.h:36
string getName()
Returns the data provider name.
setEntitySetName()
Determine the entity set name for the entity.
deleteSingleRecord(string id)
deletes a single record
hash< CdsRestRecordInfo > record_info()
Record info for the entity.
*hash< auto > createRecordImpl(hash< auto > rec, *hash< auto > create_options)
Creates the given record to the data provider.
string entity_set_name
Entity set name.
Definition: CdsEntityDataProvider.qc.dox.h:42