|
| 1 | +#pragma once |
| 2 | + |
| 3 | +#include "py_cached_item.h" |
| 4 | + |
| 5 | +namespace kuzu { |
| 6 | + |
| 7 | +class DateTimeCachedItem : public PythonCachedItem { |
| 8 | + |
| 9 | +public: |
| 10 | + DateTimeCachedItem() : PythonCachedItem("datetime"), date("date", this), |
| 11 | + datetime("datetime", this), timedelta("timedelta", this) {} |
| 12 | + |
| 13 | + PythonCachedItem date; |
| 14 | + PythonCachedItem datetime; |
| 15 | + PythonCachedItem timedelta; |
| 16 | +}; |
| 17 | + |
| 18 | +class DecimalCachedItem : public PythonCachedItem { |
| 19 | + |
| 20 | +public: |
| 21 | + DecimalCachedItem() : PythonCachedItem("decimal"), Decimal("Decimal", this) {} |
| 22 | + |
| 23 | + PythonCachedItem Decimal; |
| 24 | +}; |
| 25 | + |
| 26 | +class InspectCachedItem : public PythonCachedItem { |
| 27 | + |
| 28 | +public: |
| 29 | + InspectCachedItem() : PythonCachedItem("inspect"), currentframe("currentframe", this) {} |
| 30 | + |
| 31 | + PythonCachedItem currentframe; |
| 32 | +}; |
| 33 | + |
| 34 | +class NumpyMaCachedItem : public PythonCachedItem { |
| 35 | + |
| 36 | +public: |
| 37 | + NumpyMaCachedItem() : PythonCachedItem("numpy.ma"), masked_array("masked_array", this) {} |
| 38 | + |
| 39 | + PythonCachedItem masked_array; |
| 40 | +}; |
| 41 | + |
| 42 | +class PandasCachedItem : public PythonCachedItem { |
| 43 | + |
| 44 | + class SeriesCachedItem : public PythonCachedItem { |
| 45 | + public: |
| 46 | + explicit SeriesCachedItem(PythonCachedItem* parent): PythonCachedItem("series", parent), |
| 47 | + Series("Series", this) {} |
| 48 | + |
| 49 | + PythonCachedItem Series; |
| 50 | + }; |
| 51 | + |
| 52 | + class CoreCachedItem : public PythonCachedItem { |
| 53 | + public: |
| 54 | + explicit CoreCachedItem(PythonCachedItem* parent): PythonCachedItem("core", parent), |
| 55 | + series(this) {} |
| 56 | + |
| 57 | + SeriesCachedItem series; |
| 58 | + }; |
| 59 | + |
| 60 | + class DataFrameCachedItem : public PythonCachedItem { |
| 61 | + public: |
| 62 | + explicit DataFrameCachedItem(PythonCachedItem* parent): PythonCachedItem("DataFrame", parent), |
| 63 | + from_dict("from_dict", this) {} |
| 64 | + |
| 65 | + PythonCachedItem from_dict; |
| 66 | + }; |
| 67 | + |
| 68 | +public: |
| 69 | + PandasCachedItem() : PythonCachedItem("pandas"), core(this), DataFrame(this), NA("NA", this), |
| 70 | + NaT("NaT", this) {} |
| 71 | + |
| 72 | + CoreCachedItem core; |
| 73 | + DataFrameCachedItem DataFrame; |
| 74 | + PythonCachedItem NA; |
| 75 | + PythonCachedItem NaT; |
| 76 | +}; |
| 77 | + |
| 78 | +class PyarrowCachedItem : public PythonCachedItem { |
| 79 | + |
| 80 | + class RecordBatchCachedItem : public PythonCachedItem { |
| 81 | + public: |
| 82 | + explicit RecordBatchCachedItem(PythonCachedItem* parent): PythonCachedItem("RecordBatch", parent), |
| 83 | + _import_from_c("_import_from_c", this) {} |
| 84 | + |
| 85 | + PythonCachedItem _import_from_c; |
| 86 | + }; |
| 87 | + |
| 88 | + class SchemaCachedItem : public PythonCachedItem { |
| 89 | + public: |
| 90 | + explicit SchemaCachedItem(PythonCachedItem* parent): PythonCachedItem("Schema", parent), |
| 91 | + _import_from_c("_import_from_c", this) {} |
| 92 | + |
| 93 | + PythonCachedItem _import_from_c; |
| 94 | + }; |
| 95 | + |
| 96 | + class TableCachedItem : public PythonCachedItem { |
| 97 | + public: |
| 98 | + explicit TableCachedItem(PythonCachedItem* parent): PythonCachedItem("Table", parent), |
| 99 | + from_batches("from_batches", this) {} |
| 100 | + |
| 101 | + PythonCachedItem from_batches; |
| 102 | + }; |
| 103 | + |
| 104 | + class LibCachedItem : public PythonCachedItem { |
| 105 | + public: |
| 106 | + explicit LibCachedItem(PythonCachedItem* parent): PythonCachedItem("lib", parent), |
| 107 | + RecordBatch(this), Schema(this), Table(this) {} |
| 108 | + |
| 109 | + RecordBatchCachedItem RecordBatch; |
| 110 | + SchemaCachedItem Schema; |
| 111 | + TableCachedItem Table; |
| 112 | + }; |
| 113 | + |
| 114 | +public: |
| 115 | + PyarrowCachedItem(): PythonCachedItem("pyarrow"), lib(this) {} |
| 116 | + |
| 117 | + LibCachedItem lib; |
| 118 | +}; |
| 119 | + |
| 120 | +class UUIDCachedItem : public PythonCachedItem { |
| 121 | + |
| 122 | +public: |
| 123 | + UUIDCachedItem() : PythonCachedItem("uuid"), UUID("UUID", this) {} |
| 124 | + |
| 125 | + PythonCachedItem UUID; |
| 126 | +}; |
| 127 | + |
| 128 | +} // namespace kuzu |
0 commit comments