30 hash<string, AbstractDataField> record_type;
32 #! The original field type names
33 hash<string, string> field_types;
35 #! Hash of date/time fields for this record
36 hash<string, bool> date_time_fields;
38 #! Hash of boolean fields for this record
39 hash<string, bool> bool_fields;
41 #! Hash of integer fields for this record
42 hash<string, bool> int_fields;
67 "value":
"glide_date_time",
77 "value":
"glide_date_time",
85 "exp": AbstractDataProvider::GenericExpressions{DP_OP_AND},
86 "impl":
string sub (*
string ignored,
auto arg) {
87 throw "WHERE-ERROR",
"ServiceNow does not support nested boolean logic in queries";
91 "exp": sym(AbstractDataProvider::GenericExpressions{DP_SEARCH_OP_EQ},
QUERY_OP_EQ),
92 "impl":
string sub (
string cn,
auto arg) {
93 return sprintf(
"%s=%s", cn, arg);
97 "exp": sym(AbstractDataProvider::GenericExpressions{DP_SEARCH_OP_NE},
QUERY_OP_NE),
98 "impl":
string sub (
string cn,
auto arg) {
99 return sprintf(
"%s!=%s", cn, arg);
103 "exp": sym(AbstractDataProvider::GenericExpressions{DP_SEARCH_OP_LT},
QUERY_OP_LT),
104 "impl":
string sub (
string cn,
auto arg) {
105 return sprintf(
"%s<%s", cn, arg);
109 "exp": sym(AbstractDataProvider::GenericExpressions{DP_SEARCH_OP_LE},
QUERY_OP_LE),
110 "impl":
string sub (
string cn,
auto arg) {
111 return sprintf(
"%s<=%s", cn, arg);
115 "exp": sym(AbstractDataProvider::GenericExpressions{DP_SEARCH_OP_GT},
QUERY_OP_GT),
116 "impl":
string sub (
string cn,
auto arg) {
117 return sprintf(
"%s>%s", cn, arg);
121 "exp": sym(AbstractDataProvider::GenericExpressions{DP_SEARCH_OP_GE},
QUERY_OP_GE),
122 "impl":
string sub (
string cn,
auto arg) {
123 return sprintf(
"%s>=%s", cn, arg);
127 "exp": sym(AbstractDataProvider::GenericExpressions{DP_SEARCH_OP_IN},
QUERY_OP_IN),
128 "impl":
string sub (
string cn,
auto arg) {
129 return sprintf(
"%sIN%s", cn, (foldl $1 +
"," + $2, arg));
133 "exp": <DataProviderExpressionInfo>{
134 "type": DET_Operator,
137 "desc":
"An expression with the ServiceNow 'notin' operator",
139 "args": (DataProviderSignatureFieldType, DataProviderSignatureStringValueType),
140 "return_type": AbstractDataProviderTypeMap.
"bool",
142 "impl":
string sub (
string cn,
auto arg) {
143 return sprintf(
"%sNOTIN%s", cn, (foldl $1 +
"," + $2, arg));
147 "exp": <DataProviderExpressionInfo>{
148 "type": DET_Operator,
151 "desc":
"An expression with the ServiceNow 'like' operator",
153 "args": (DataProviderSignatureFieldType, DataProviderSignatureStringValueType),
154 "return_type": AbstractDataProviderTypeMap.
"bool",
156 "impl":
string sub (
string cn,
auto arg) {
157 return sprintf(
"%sLIKE%s", cn, arg);
161 "exp": <DataProviderExpressionInfo>{
162 "type": DET_Operator,
165 "desc":
"An expression with the ServiceNow 'notlike' operator",
167 "args": (DataProviderSignatureFieldType, DataProviderSignatureStringValueType),
168 "return_type": AbstractDataProviderTypeMap.
"bool",
170 "impl":
string sub (
string cn,
auto arg) {
171 return sprintf(
"%sNOTLIKE%s", cn, arg);
175 "exp": <DataProviderExpressionInfo>{
176 "type": DET_Operator,
179 "desc":
"An expression with the ServiceNow 'startswith' operator",
180 "symbol":
"STARTSWITH",
181 "args": (DataProviderSignatureFieldType, DataProviderSignatureStringValueType),
182 "return_type": AbstractDataProviderTypeMap.
"bool",
184 "impl":
string sub (
string cn,
auto arg) {
185 return sprintf(
"%sSTARTSWITH%s", cn, arg);
189 "exp": <DataProviderExpressionInfo>{
190 "type": DET_Operator,
193 "desc":
"An expression with the ServiceNow 'endswith' operator",
194 "symbol":
"ENDSWITH",
195 "args": (DataProviderSignatureFieldType, DataProviderSignatureStringValueType),
196 "return_type": AbstractDataProviderTypeMap.
"bool",
198 "impl":
string sub (
string cn,
auto arg) {
199 return sprintf(
"%sISEMPTY", cn);
203 "exp": <DataProviderExpressionInfo>{
204 "type": DET_Operator,
207 "desc":
"An expression with the ServiceNow 'isnotempty' operator",
208 "symbol":
"ISNOTEMPTY",
209 "args": (DataProviderSignatureFieldType,),
210 "return_type": AbstractDataProviderTypeMap.
"bool",
212 "impl":
string sub (
string cn,
auto arg) {
213 return sprintf(
"%sISNOTEMPTY", cn);
240 *hash<string, DataProvider::AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
283 int updateRecordsImpl(hash<auto> set, hash<DataProviderExpression> where_cond, *hash<auto> search_options);
326hash<DataProviderExpressionInfo> sym(hash<DataProviderExpressionInfo> exp,
string label);
The ServiceNowRest data provider class.
Definition: ServiceNowRestDataProviderBase.qc.dox.h:28
ServiceNowRestClient::ServiceNowRestClient rest
The REST client object for API calls.
Definition: ServiceNowRestDataProviderBase.qc.dox.h:33
The ServiceNowTableDataProvider data provider class.
Definition: ServiceNowTableDataProvider.qc.dox.h:46
const SysColumns
System columns.
Definition: ServiceNowTableDataProvider.qc.dox.h:59
getRecordInfoIntern()
Retrieves the record type.
*hash< auto > createRecordImpl(hash< auto > rec, *hash< auto > create_options)
Creates the given record to the data provider.
hash< DataProviderExpression > getEqualityComparisonExpression(int role, hash< DataProviderInfo > info, string key, auto value)
Returns an equality comparison expression.
hash< auto > meta
Metadata description.
Definition: ServiceNowTableDataProvider.qc.dox.h:56
int updateRecordsImpl(hash< auto > set, hash< DataProviderExpression > where_cond, *hash< auto > search_options)
Updates zero or more records matching the search options.
hash< auto > access
Access description.
Definition: ServiceNowTableDataProvider.qc.dox.h:53
deleteSingleRecord(string id)
deletes a single record
updateSingleRecord(string id, hash< auto > set)
updates a single record
string uri_path
URI path prefix.
Definition: ServiceNowTableDataProvider.qc.dox.h:223
constructor(ServiceNowRestClient rest, string name, hash< auto > access, hash< auto > meta)
Creates the object from the arguments.
const Expressions
Supported expressions.
Definition: ServiceNowTableDataProvider.qc.dox.h:83
string name
Current object name.
Definition: ServiceNowTableDataProvider.qc.dox.h:50
DataProvider::AbstractDataProviderRecordIterator searchRecordsImpl(*hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
hash< ServiceNowRestRecordInfo > record_info()
Record info for the table.
hash< DataProvider::DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
int deleteRecordsImpl(*hash< DataProviderExpression > where_cond, *hash< auto > search_options)
Deletes zero or more records.
string getName()
Returns the data provider name.
string getDesc()
Returns the data provider description.
const QUERY_OP_ENDSWITH
ends with operator
Definition: ServiceNowRestDataProviderDefs.qc.dox.h:50
const QUERY_OP_STARTSWITH
starts with operator
Definition: ServiceNowRestDataProviderDefs.qc.dox.h:55
const QUERY_OP_IN
the Query "IN" operator for use in queries
Definition: ServiceNowRestDataProviderDefs.qc.dox.h:100
const QUERY_OP_GE
the Query greater than or equals operator (>=) for use in queries
Definition: ServiceNowRestDataProviderDefs.qc.dox.h:75
const QUERY_OP_NE
the Query not equals operator (!= or <>) for use in queries
Definition: ServiceNowRestDataProviderDefs.qc.dox.h:80
const QUERY_OP_GT
the Query greater than operator (>) for use in queries
Definition: ServiceNowRestDataProviderDefs.qc.dox.h:70
const QUERY_OP_LT
the Query less than (<) operator for use in queries
Definition: ServiceNowRestDataProviderDefs.qc.dox.h:60
const QUERY_OP_LIKE
Definition: ServiceNowRestDataProviderDefs.qc.dox.h:40
const QUERY_OP_LE
the Query less than or equals (<=) operator for use in queries
Definition: ServiceNowRestDataProviderDefs.qc.dox.h:65
const QUERY_OP_EQ
the Query equals operator (=) for use in queries
Definition: ServiceNowRestDataProviderDefs.qc.dox.h:85
const QUERY_OP_ISNOTEMPTY
the Query "is not empty string" operator (ISNOTEMPTY) for use in queries
Definition: ServiceNowRestDataProviderDefs.qc.dox.h:95
const QUERY_OP_NOTIN
the Query "NOTIN" operator for use in queries
Definition: ServiceNowRestDataProviderDefs.qc.dox.h:105
const QUERY_OP_NOTLIKE
not like operator
Definition: ServiceNowRestDataProviderDefs.qc.dox.h:45
Qore ServiceNowRestDataProvider module definition.
Definition: ServiceNowRestDataProvider.qc.dox.h:26
hashdecl ServiceNowRestRecordInfo
contains ServiceNow object record information
Definition: ServiceNowTableDataProvider.qc.dox.h:28