User-Defined Function API  9.0
 All Classes Functions Typedefs Enumerations Enumerator
MarkLogic.h
1 /* -*- mode: c++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2  *
3  * Copyright 2002-2018 MarkLogic Corporation. All Rights Reserved.
4  *
5  */
32 #ifndef _MARKLOGIC_MARKLOGIC_H_
33 #define _MARKLOGIC_MARKLOGIC_H_
34 
35 #include <stddef.h>
36 
37 #ifdef _MSC_VER
38 typedef __int32 int32_t;
39 typedef unsigned __int32 uint32_t;
40 typedef __int64 int64_t;
41 typedef unsigned __int64 uint64_t;
42 #ifndef MLDLL
43 #define MLDLL __declspec(dllimport)
44 #endif
45 #else // !_MSC_VER
46 #include <stdint.h>
47 #define MLDLL
48 #endif
49 
50 #define MARKLOGIC_API_VERSION 3
51 
52 namespace marklogic
53 {
54 
55 class CodePointStringImpl;
56 class Map;
57 class MapImpl;
58 class SequenceImpl;
59 class StringImpl;
60 class LangStringImpl;
61 
63 class MLDLL RangeIndex
64 {
65 public:
74  enum Type {
75  INT,
77  LONG,
83  TIME,
84  DATE,
93  POINT
94  };
95 
97  enum Order {
98  ASCENDING,
99  DESCENDING
100  };
101 };
102 
103 template<class T, typename PT>
104 class MLDLL CTypeWrapperBase
105 {
106 protected:
107  PT val;
108 
109 public:
110  CTypeWrapperBase(): val(0) {}
111  CTypeWrapperBase(PT v): val(v) {}
112 
113  operator PT&() { return val; }
114  operator const PT&() const { return val; }
115 
116  bool operator<(T o) const { return val < o.val; }
117  bool operator<=(T o) const { return val <= o.val; }
118  bool operator>(T o) const { return val > o.val; }
119  bool operator>=(T o) const { return val >= o.val; }
120  bool operator==(T o) const { return val == o.val; }
121  bool operator!=(T o) const { return val != o.val; }
122 
123  T operator-(T o) const { return val - o.val; }
124  T operator+(T o) const { return val + o.val; }
125  T operator*(T o) const { return val * o.val; }
126  T operator/(T o) const { return val / o.val; }
127 
128  T operator--(int) { return val--; }
129  T operator++(int) { return val++; }
130  T& operator--() { --val; return (T&)*this; }
131  T& operator++() { ++val; return (T&)*this; }
132  T& operator-=(T o) { val -= o.val; return (T&)*this; }
133  T& operator+=(T o) { val += o.val; return (T&)*this; }
134  T& operator*=(T o) { val *= o.val; return (T&)*this; }
135  T& operator/=(T o) { val /= o.val; return (T&)*this; }
136 };
137 
138 template<class T, typename PT>
139 class MLDLL CTypeWrapperF : public CTypeWrapperBase<T,PT>
140 {
141 protected:
142  typedef CTypeWrapperF<T,PT> Base;
143 
144 public:
145  CTypeWrapperF() {}
147 
148  T operator-() const { return -this->val; }
149  T operator+() const { return +this->val; }
150 };
151 
152 template<class T, typename PT>
153 class MLDLL CTypeWrapperU : public CTypeWrapperBase<T,PT>
154 {
155 protected:
156  typedef CTypeWrapperU<T,PT> Base;
157 
158 public:
159  CTypeWrapperU() {}
161 
162  T operator%(T o) const { return this->val % o.val; }
163  T& operator%=(T o) { this->val %= o.val; return (T&)*this; }
164 };
165 
166 template<class T, typename PT>
167 class MLDLL CTypeWrapper : public CTypeWrapperU<T,PT>
168 {
169 protected:
170  typedef CTypeWrapper<T,PT> Base;
171 
172 public:
173  CTypeWrapper() {}
174  CTypeWrapper(PT v): CTypeWrapperU<T,PT>(v) {}
175 
176  T operator-() const { return -this->val; }
177  T operator+() const { return +this->val; }
178 };
179 
180 
181 #ifdef _MSC_VER
182 typedef double DecimalType;
183 #else
184 typedef long double DecimalType;
185 #endif
186 
187 class MLDLL Decimal : public CTypeWrapperF<Decimal,DecimalType>
188 {
189 public:
190  Decimal(): Base() {}
191  Decimal(DecimalType v): Base(v) {}
192 };
193 
195 class MLDLL DateTime : public CTypeWrapper<DateTime,int64_t>
196 {
197 public:
198  DateTime(): Base() {}
199  DateTime(int64_t v): Base(v) {}
200 };
201 
203 class MLDLL Date : public CTypeWrapper<Date,int64_t>
204 {
205 public:
206  Date(): Base() {}
207  Date(int64_t v): Base(v) {}
208 };
209 
211 class MLDLL Time : public CTypeWrapper<Time,int64_t>
212 {
213 public:
214  Time(): Base() {}
215  Time(int64_t v): Base(v) {}
216 };
217 
219 class MLDLL GYearMonth : public CTypeWrapper<GYearMonth,int>
220 {
221 public:
222  GYearMonth(): Base() {}
223  GYearMonth(int v): Base(v) {}
224 };
225 
227 class MLDLL GYear : public CTypeWrapper<GYear,int>
228 {
229 public:
230  GYear(): Base() {}
231  GYear(int v): Base(v) {}
232 };
233 
235 class MLDLL GMonth : public CTypeWrapperU<GMonth,unsigned>
236 {
237 public:
238  GMonth(): Base() {}
239  GMonth(unsigned v): Base(v) {}
240 };
241 
243 class MLDLL GDay : public CTypeWrapperU<GDay,unsigned>
244 {
245 public:
246  GDay(): Base() {}
247  GDay(unsigned v): Base(v) {}
248 };
249 
251 class MLDLL YearMonthDuration : public CTypeWrapper<YearMonthDuration,int>
252 {
253 public:
254  YearMonthDuration(): Base() {}
255  YearMonthDuration(int v): Base(v) {}
256 };
257 
259 class MLDLL DayTimeDuration : public CTypeWrapper<DayTimeDuration,int64_t>
260 {
261 public:
262  DayTimeDuration(): Base() {}
263  DayTimeDuration(int64_t v): Base(v) {}
264 };
265 
268 class MLDLL String
269 {
270 public:
271  String(StringImpl* =0);
272  String(const char* _str, const char* _collation = 0);
273  String(const String& o);
274  String& operator=(const String& o);
275  ~String();
276 
277  operator bool() const { return str!=0; }
278 
279  operator const char*() const;
280  const char* get() const;
281  size_t length() const;
282  const char* collation() const;
283 
284  bool operator<(const String& o) const;
285  bool operator<=(const String& o) const;
286  bool operator>(const String& o) const;
287  bool operator>=(const String& o) const;
288  bool operator==(const String& o) const;
289  bool operator!=(const String& o) const;
290 
291 protected:
292  StringImpl* str;
293 };
294 
297 class MLDLL LangString
298 {
299 public:
300  LangString(LangStringImpl* =0);
301  LangString(const char* _str, const char* _language = 0);
302  LangString(const LangString& o);
303  LangString& operator=(const LangString& o);
304  ~LangString();
305 
306  operator bool () const { return str!=0; }
307 
308  operator const char*() const;
309  const char* get() const;
310  size_t length() const;
311  const char* language() const;
312 
313  bool operator<(const LangString& o) const;
314  bool operator<=(const LangString& o) const;
315  bool operator>(const LangString& o) const;
316  bool operator>=(const LangString& o) const;
317  bool operator==(const LangString& o) const;
318  bool operator!=(const LangString& o) const;
319 
320 protected:
321  LangStringImpl* str;
322 };
323 
325 class MLDLL Point
326 {
327 protected:
328  double lat;
329  double lng;
330  const void* coord;
331 
332 public:
333  Point();
334  Point(double _lat, double _lng, const char* _coordinateSystem = "wgs84");
335 
336  double latitude() const;
337  double longitude() const;
338  const char* coordinateSystem() const;
339 
340  bool operator<(const Point& o) const;
341  bool operator<=(const Point& o) const;
342  bool operator>(const Point& o) const;
343  bool operator>=(const Point& o) const;
344  bool operator==(const Point& o) const;
345  bool operator!=(const Point& o) const;
346 };
347 
373 class MLDLL TupleIterator
374 {
375 public:
377  virtual void next() =0;
379  virtual bool done() const =0;
380 
381  // Information about this tuple iterator
383  virtual bool descending() const =0;
385  virtual size_t width() const =0;
387  virtual RangeIndex::Type type(size_t i) const =0;
391  virtual const char* collation(size_t i) const =0;
395  virtual const char* coordinateSystem(size_t i) const =0;
396 
397  // Information about the current tuple
404  virtual uint64_t frequency() const =0;
408  virtual bool null(size_t i) const =0;
409 
422  virtual void value(size_t i, int&) const =0;
423  virtual void value(size_t i, unsigned&) const =0;
424  virtual void value(size_t i, int64_t&) const =0;
425  virtual void value(size_t i, uint64_t&) const =0;
426  virtual void value(size_t i, float&) const =0;
427  virtual void value(size_t i, double&) const =0;
428  virtual void value(size_t i, Decimal&) const =0;
429  virtual void value(size_t i, DateTime&) const =0;
430  virtual void value(size_t i, Date&) const =0;
431  virtual void value(size_t i, Time&) const =0;
432  virtual void value(size_t i, GYearMonth&) const =0;
433  virtual void value(size_t i, GYear&) const =0;
434  virtual void value(size_t i, GMonth&) const =0;
435  virtual void value(size_t i, GDay&) const =0;
436  virtual void value(size_t i, YearMonthDuration&) const =0;
437  virtual void value(size_t i, DayTimeDuration&) const =0;
438  virtual void value(size_t i, String&) const =0;
439  virtual void value(size_t i, Point&) const =0;
440  virtual void value(size_t i, LangString&) const =0;
443 protected:
444  TupleIterator();
445  virtual ~TupleIterator();
446 private:
448  TupleIterator &operator=(const TupleIterator&);
449 };
450 
464 class MLDLL OutputSequence
465 {
466 public:
470  virtual void writeValue(int) =0;
471  virtual void writeValue(unsigned) =0;
472  virtual void writeValue(int64_t) =0;
473  virtual void writeValue(uint64_t) =0;
474  virtual void writeValue(float) =0;
475  virtual void writeValue(double) =0;
476  virtual void writeValue(Decimal) =0;
477  virtual void writeValue(DateTime) =0;
478  virtual void writeValue(Date) =0;
479  virtual void writeValue(Time) =0;
480  virtual void writeValue(GYearMonth) =0;
481  virtual void writeValue(GYear) =0;
482  virtual void writeValue(GMonth) =0;
483  virtual void writeValue(GDay) =0;
484  virtual void writeValue(YearMonthDuration) =0;
485  virtual void writeValue(DayTimeDuration) =0;
486  virtual void writeValue(const String&) =0;
487  virtual void writeValue(Point) =0;
488  virtual void writeValue(bool) =0;
489  virtual void writeValue(const LangString&) =0;
517  virtual void startMap() =0;
521  virtual void writeMapKey(const char*) =0;
523  virtual void endMap() =0;
526 protected:
527  OutputSequence();
528  virtual ~OutputSequence();
529 private:
531  OutputSequence &operator=(const OutputSequence&);
532 };
533 
540 class MLDLL Encoder
541 {
542 public:
543  virtual void encode(const void*, size_t) =0;
544 
545  virtual void encode(int) =0;
546  virtual void encode(unsigned) =0;
547  virtual void encode(int64_t) =0;
548  virtual void encode(uint64_t) =0;
549  virtual void encode(float) =0;
550  virtual void encode(double) =0;
551  virtual void encode(Decimal) =0;
552  virtual void encode(DateTime) =0;
553  virtual void encode(Date) =0;
554  virtual void encode(Time) =0;
555  virtual void encode(GYearMonth) =0;
556  virtual void encode(GYear) =0;
557  virtual void encode(GMonth) =0;
558  virtual void encode(GDay) =0;
559  virtual void encode(YearMonthDuration) =0;
560  virtual void encode(DayTimeDuration) =0;
561  virtual void encode(const String&) =0;
562  virtual void encode(Point) =0;
563  virtual void encode(bool) =0;
564  virtual void encode(const LangString&) =0;
565 
566 protected:
567  Encoder();
568  virtual ~Encoder();
569 private:
570  Encoder(const Encoder&);
571  Encoder &operator=(const Encoder&);
572 };
573 
580 class MLDLL Decoder
581 {
582 public:
583  virtual void decode(const void*&, size_t&) =0;
584  virtual void decode(void*, size_t) =0;
585 
586  virtual void decode(int&) =0;
587  virtual void decode(unsigned&) =0;
588  virtual void decode(int64_t&) =0;
589  virtual void decode(uint64_t&) =0;
590  virtual void decode(float&) =0;
591  virtual void decode(double&) =0;
592  virtual void decode(Decimal&) =0;
593  virtual void decode(DateTime&) =0;
594  virtual void decode(Date&) =0;
595  virtual void decode(Time&) =0;
596  virtual void decode(GYearMonth&) =0;
597  virtual void decode(GYear&) =0;
598  virtual void decode(GMonth&) =0;
599  virtual void decode(GDay&) =0;
600  virtual void decode(YearMonthDuration&) =0;
601  virtual void decode(DayTimeDuration&) =0;
602  virtual void decode(String&) =0;
603  virtual void decode(Point&) =0;
604  virtual void decode(bool&) =0;
605  virtual void decode(LangString&) =0;
606 
607 protected:
608  Decoder();
609  virtual ~Decoder();
610 private:
611  Decoder(const Decoder&);
612  Decoder &operator=(const Decoder&);
613 };
614 
626 class MLDLL Reporter
627 {
628 public:
630  enum LogLevel {
631  Finest,
632  Finer,
633  Fine,
634  Debug,
635  Config,
636  Info,
637  Notice,
638  Warning,
639  Error,
640  Critical,
641  Alert,
642  Emergency,
643  Disabled
644  };
645 
650  virtual LogLevel logLevel() const =0;
652  virtual void log(LogLevel level, const char* message) =0;
659  virtual void error(const char* message) =0;
660 
661 protected:
662  Reporter();
663  virtual ~Reporter();
664 private:
665  Reporter(const Reporter&);
666  Reporter &operator=(const Reporter&);
667 };
668 
670 class MLDLL Item
671 {
672 public:
680  enum Type {
681  // Atomic types
682  INT,
701 
702  // QNAME,
703  // NOTATION,
704  // DURATION,
705  // G_MONTH_DAY,
706  // BASE_64_BINARY,
707  // HEX_BINARY,
708  // UNTYPED_ATOMIC,
709 
710  // MarkLogic types
712  MAP,
713 
714  // RDF types
716 
717  // BOX,
718  // CIRCLE,
719  // POLYGON,
720  // LINESTRING,
721  // COMPLEX_POLYGON,
722  // ARRAY,
723 
724  // // Nodes
725  // DOCUMENT,
726  // ELEMENT,
727  // ATTRIBUTE,
728  // TEXT,
729  // PROCESSING_INSTRUCTION,
730  // COMMENT,
731  // NAMESPACE,
732  // BINARY,
733 
734  // FUNCTION,
735 
736  OTHER
737  };
738 };
739 
750 class MLDLL Sequence
751 {
752 public:
753  Sequence(SequenceImpl* =0);
754  Sequence(const Sequence&);
755  Sequence& operator=(const Sequence&);
756  ~Sequence();
757 
759  operator bool() const { return seq!=0; }
760 
764  void next();
766  bool done() const;
767 
769  Item::Type type() const;
773  uint64_t frequency() const;
774 
778  void value(int&) const;
779  void value(unsigned&) const;
780  void value(int64_t&) const;
781  void value(uint64_t&) const;
782  void value(float&) const;
783  void value(double&) const;
784  void value(Decimal&) const;
785  void value(DateTime&) const;
786  void value(Date&) const;
787  void value(Time&) const;
788  void value(GYearMonth&) const;
789  void value(GYear&) const;
790  void value(GMonth&) const;
791  void value(GDay&) const;
792  void value(YearMonthDuration&) const;
793  void value(DayTimeDuration&) const;
794  void value(String&) const;
795  void value(bool&) const;
796 
797  void value(Point&) const;
798  void value(Map&) const;
799  void value(LangString&) const;
802 private:
803  SequenceImpl* seq;
804 };
805 
807 class MLDLL Map
808 {
809 public:
810  Map(MapImpl* =0);
811  Map(const Map&);
812  Map& operator=(const Map&);
813  ~Map();
814 
816  operator bool() const { return map!=0; }
817 
819  Sequence get(const char* key) const;
820 
821 private:
822  MapImpl* map;
823 };
824 
856 class MLDLL AggregateUDF
857 {
858 public:
859  // Management methods
872  virtual AggregateUDF* clone() const =0;
878  virtual void close() =0;
879 
892  virtual void start(Sequence& arg, Reporter& r) =0;
904  virtual void finish(OutputSequence& os, Reporter& r) =0;
905 
906  // Map/reduce methods
918  virtual void map(TupleIterator& values, Reporter& r) =0;
934  virtual void reduce(const AggregateUDF* o, Reporter& r) =0;
935 
936  // Serialize/deserialize
948  virtual void encode(Encoder& e, Reporter& r) =0;
960  virtual void decode(Decoder& d, Reporter& r) =0;
961 
970  virtual RangeIndex::Order getOrder() const;
971 
972 protected:
973  // Detect DLLs compiled against a different API version
987  AggregateUDF(unsigned version = MARKLOGIC_API_VERSION);
988  virtual ~AggregateUDF();
989 };
990 
1002 typedef AggregateUDF*(*AggregateFunction)();
1003 
1010 class MLDLL Token
1011 {
1012 public:
1022  typedef unsigned char TokenType;
1023 
1024  static const TokenType SPACE = 's';
1025  static const TokenType PUNCT = 'p';
1026  static const TokenType WORD = 'w';
1027  static const TokenType SPECIAL = 'x';
1028 
1049  typedef unsigned char PartOfSpeech;
1050  static const PartOfSpeech UNSPECIFIED_POS = '\0';
1051  static const PartOfSpeech NOUN_POS = 'n';
1052  static const PartOfSpeech VERB_POS = 'v';
1053  static const PartOfSpeech ADJECTIVE_POS = 'a';
1054  static const PartOfSpeech ADVERB_POS = 'r';
1055  static const PartOfSpeech PRONOUN_POS = 'p';
1056  static const PartOfSpeech CONJUNCTION_POS = 'c';
1057  static const PartOfSpeech DETERMINER_POS = 'd';
1058  static const PartOfSpeech MISC_POS = '?';
1059 
1060 public:
1061  unsigned begin;
1062  unsigned end;
1063  TokenType type;
1064  PartOfSpeech pos;
1065 
1066 public:
1067  Token(unsigned _begin, unsigned _end, TokenType _type, PartOfSpeech _pos):
1068  begin(_begin), end(_end), type(_type), pos(_pos) {}
1069  Token(unsigned _begin, unsigned _end, TokenType _type):
1070  begin(_begin), end(_end), type(_type), pos(UNSPECIFIED_POS) {}
1071  Token(): begin(0), end(0), type(SPACE), pos(UNSPECIFIED_POS) {}
1072  Token(const Token& t):
1073  begin(t.begin), end(t.end), type(t.type), pos(t.pos) {}
1074  ~Token() {}
1075 };
1076 
1080 typedef unsigned CodePoint;
1081 
1082 class MLDLL CodePointString
1083 {
1084 public:
1085  CodePointString(const CodePoint* ptr, unsigned siz);
1086  CodePointString(const char* utf8);
1087  CodePointString(const CodePointString& other);
1088  CodePointString& operator=(const CodePointString& other);
1089  ~CodePointString();
1090 
1092  operator bool() const { return cpstr!=0; };
1093 
1095  const CodePoint* data() const;
1097  unsigned length() const;
1098 
1100  void appendUTF8(const char* utf8);
1102  void append(const CodePoint* ptr, unsigned siz);
1104  void push_back(CodePoint cp);
1106  void clear();
1108  void reserve(size_t sz);
1109 
1110 protected:
1111  CodePointStringImpl* cpstr;
1112 };
1113 
1153 class MLDLL LexerUDF
1154 {
1155 public:
1156  // Management methods
1161  virtual void close() =0;
1167  virtual bool isStale() const =0;
1178  virtual void initialize(const char* lang,
1179  int argc, const char** argv,
1180  Reporter& r) =0;
1181 
1182  // Operations
1192  virtual void reset(const CodePoint* cp, unsigned sz, Reporter& r) =0;
1200  virtual void finish(Reporter& r) =0;
1206  virtual bool next(Reporter& r) =0;
1213  virtual const Token* token() const =0;
1214 
1215 protected:
1216  // Detect DLLs compiled against a different API version
1230  LexerUDF(unsigned version = MARKLOGIC_API_VERSION);
1231  virtual ~LexerUDF();
1232 };
1233 
1245 typedef LexerUDF*(*LexerFunction)();
1246 
1297 class MLDLL StemmerUDF
1298 {
1299 public:
1300  // Management methods
1305  virtual void close() =0;
1311  virtual bool isStale() const =0;
1322  virtual void initialize(const char* lang,
1323  int argc, const char** argv,
1324  Reporter& r) =0;
1325 
1326  // Operations
1334  virtual void reset(const CodePoint* cp, const unsigned sz, Token::PartOfSpeech pos, Reporter& r) =0;
1335 
1342  virtual void start(Reporter& r) =0;
1343 
1349  virtual bool next(Reporter& r) =0;
1350 
1357  virtual const CodePointString* stem() =0;
1358 
1367  virtual bool delegate() const =0;
1368 
1369 protected:
1370  // Detect DLLs compiled against a different API version
1384  StemmerUDF(unsigned version = MARKLOGIC_API_VERSION);
1385  virtual ~StemmerUDF();
1386 };
1387 
1399 typedef StemmerUDF*(*StemmerFunction)();
1400 
1424 class MLDLL Registry
1425 {
1426 public:
1443  void version(unsigned pluginVersion = makeVersion(__DATE__,__TIME__),
1444  unsigned marklogicVersion = MARKLOGIC_API_VERSION);
1445 
1462  template<class T> void registerAggregate(const char* name);
1482  virtual void registerAggregate(const char* name, AggregateFunction f) =0;
1483 
1499  template<class T> void registerLexer(const char* name);
1518  virtual void registerLexer(const char* name, LexerFunction f) =0;
1519 
1535  template<class T> void registerStemmer(const char* name);
1554  virtual void registerStemmer(const char* name, StemmerFunction f) =0;
1555 
1556 protected:
1557  Registry();
1558  virtual ~Registry();
1559 private:
1560  Registry(const Registry&);
1561  Registry &operator=(const Registry&);
1562  static unsigned makeVersion(const char*,const char*);
1563 protected:
1564  unsigned pluginVersion;
1565 };
1566 
1567 template<class T>
1568 inline AggregateUDF*
1569 constructAggregate()
1570 {
1571  return new T();
1572 }
1573 
1574 template<class T>
1575 inline LexerUDF*
1576 constructLexer()
1577 {
1578  return new T();
1579 }
1580 
1581 template<class T>
1582 inline StemmerUDF*
1583 constructStemmer()
1584 {
1585  return new T();
1586 }
1587 
1588 template<class T>
1589 inline void Registry::
1590 registerAggregate(const char* name)
1591 {
1592  registerAggregate(name, marklogic::constructAggregate<T>);
1593 }
1594 
1595 template<class T>
1596 inline void Registry::
1597 registerLexer(const char* name)
1598 {
1599  registerLexer(name, marklogic::constructLexer<T>);
1600 }
1601 
1602 template<class T>
1603 inline void Registry::
1604 registerStemmer(const char* name)
1605 {
1606  registerStemmer(name, marklogic::constructStemmer<T>);
1607 }
1608 
1609 }
1610 
1611 #endif
Encapsulation of XQuery sequence item value type.
Definition: MarkLogic.h:670
xs:gYearMonth
Definition: MarkLogic.h:692
C++ representation of the XQuery type xs:decimal.
Definition: MarkLogic.h:187
void registerStemmer(const char *name)
Register a StemmerUDF implementation with MarkLogic Server.
Definition: MarkLogic.h:1604
Encapsulation of a User Defined Function for performing aggregate analysis across co-occurrences in r...
Definition: MarkLogic.h:856
xs:gDay
Definition: MarkLogic.h:695
xs:gMonth
Definition: MarkLogic.h:694
xs:unsignedLong
Definition: MarkLogic.h:685
C++ representation of the XQuery type xs:gYear.
Definition: MarkLogic.h:227
xs:date
Definition: MarkLogic.h:691
Order
Whether the index values are in ascending or descending order.
Definition: MarkLogic.h:97
Serialize values.
Definition: MarkLogic.h:540
Encapsulation of a User Defined Function for performing stemming of individual words.
Definition: MarkLogic.h:1297
C++ representation of the MarkLogic XQuery cts:point.
Definition: MarkLogic.h:325
Type
The type of the values in a range index.
Definition: MarkLogic.h:74
Definition: MarkLogic.h:139
C++ representation of the RDF type rdf:langString, encapsulating a string value with its language...
Definition: MarkLogic.h:297
C++ representation of the XQuery type xs:time.
Definition: MarkLogic.h:211
void registerLexer(const char *name)
Register a LexerUDF implementation with MarkLogic Server.
Definition: MarkLogic.h:1597
unsigned char PartOfSpeech
The part of speech of the token being returned. Part of speech is only relevant for word tokens...
Definition: MarkLogic.h:1049
A sequence of values produced by your AggregateUDF::finish implementation.
Definition: MarkLogic.h:464
xs:string
Definition: MarkLogic.h:91
xs:gYearMonth
Definition: MarkLogic.h:85
Encapsulation of a User Defined Function for performing tokenization of text runs.
Definition: MarkLogic.h:1153
Type
The types of item values that can occur in a Sequence.
Definition: MarkLogic.h:680
xs:int
Definition: MarkLogic.h:682
C++ representation of the XQuery type xs:dateTime.
Definition: MarkLogic.h:195
cts:point (MarkLogic XQuery dialect)
Definition: MarkLogic.h:711
xs:time
Definition: MarkLogic.h:690
xs:long
Definition: MarkLogic.h:684
void registerAggregate(const char *name)
Register an AggregateUDF implementation with MarkLogic Server.
Definition: MarkLogic.h:1590
C++ representation of the XQuery type xs:gYearMonth.
Definition: MarkLogic.h:219
xs:time
Definition: MarkLogic.h:83
xs:float
Definition: MarkLogic.h:79
LogLevel
Available log levels.
Definition: MarkLogic.h:630
A key-value map, equivalent to the MarkLogic XQuery type map:map.
Definition: MarkLogic.h:807
C++ representation of the MarkLogic token.
Definition: MarkLogic.h:1010
xs:float
Definition: MarkLogic.h:686
xs:yearMonthDuration
Definition: MarkLogic.h:89
Log messages and report errors to MarkLogic Server. You do not need to subclass this class...
Definition: MarkLogic.h:626
xs:date
Definition: MarkLogic.h:84
xs:unsignedInt
Definition: MarkLogic.h:683
Encapsulation of the configuration of a range index.
Definition: MarkLogic.h:63
xs:boolean
Definition: MarkLogic.h:700
xs:yearMonthDuration
Definition: MarkLogic.h:696
xs:int
Definition: MarkLogic.h:75
rdf:langString (SPARQL)
Definition: MarkLogic.h:715
xs:gMonth
Definition: MarkLogic.h:87
C++ representation of the XQuery type xs:dayTimeDuration.
Definition: MarkLogic.h:259
Definition: MarkLogic.h:104
C++ representation of the XQuery type xs:string, encapsulating a string value with its collation...
Definition: MarkLogic.h:268
xs:anyURI
Definition: MarkLogic.h:699
xs:anyURI
Definition: MarkLogic.h:92
xs:double
Definition: MarkLogic.h:687
The MarkLogic Server native plugin registry.
Definition: MarkLogic.h:1424
xs:decimal
Definition: MarkLogic.h:81
A sequence of Item values.
Definition: MarkLogic.h:750
Iterator over a sequence of N-way co-occurrences of range index values from a single stand...
Definition: MarkLogic.h:373
xs:dayTimeDuration
Definition: MarkLogic.h:90
xs:gYear
Definition: MarkLogic.h:693
C++ representation of the XQuery type xs:gMonth.
Definition: MarkLogic.h:235
Definition: MarkLogic.h:1082
map:map (MarkLogic XQuery dialect)
Definition: MarkLogic.h:712
unsigned char TokenType
The kind of token being returned.
Definition: MarkLogic.h:1022
xs:decimal
Definition: MarkLogic.h:688
xs:double
Definition: MarkLogic.h:80
C++ representation of the XQuery type xs:date.
Definition: MarkLogic.h:203
C++ representation of the XQuery type xs:gDay.
Definition: MarkLogic.h:243
xs:gYear
Definition: MarkLogic.h:86
xs:dateTime
Definition: MarkLogic.h:82
xs:gDay
Definition: MarkLogic.h:88
xs:unsignedInt
Definition: MarkLogic.h:76
xs:string
Definition: MarkLogic.h:698
xs:long
Definition: MarkLogic.h:77
Definition: MarkLogic.h:153
xs:dateTime
Definition: MarkLogic.h:689
C++ representation of the XQuery type xs:yearMonthDuration.
Definition: MarkLogic.h:251
xs:unsignedLong
Definition: MarkLogic.h:78
De-serialize values.
Definition: MarkLogic.h:580
Definition: MarkLogic.h:167
xs:dayTimeDuration
Definition: MarkLogic.h:697