@gscdump/engine-sqlite 0.20.2 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +14 -6
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -133,11 +133,19 @@ const schema = {
|
|
|
133
133
|
...metricCols()
|
|
134
134
|
})
|
|
135
135
|
};
|
|
136
|
-
const
|
|
136
|
+
const GSC_TABLE_TO_LOGICAL = {
|
|
137
|
+
gsc_pages: "pages",
|
|
138
|
+
gsc_keywords: "queries",
|
|
139
|
+
gsc_countries: "countries",
|
|
140
|
+
gsc_devices: null,
|
|
141
|
+
gsc_page_keywords: "page_queries",
|
|
142
|
+
gsc_search_appearance: "search_appearance",
|
|
143
|
+
gsc_hourly_pages: "hourly_pages"
|
|
144
|
+
};
|
|
137
145
|
assertSchemaInSync({
|
|
138
146
|
label: "sqlite",
|
|
139
|
-
schema,
|
|
140
|
-
tableKeyToName: (key) => key
|
|
147
|
+
schema: Object.fromEntries(Object.entries(schema).filter(([k]) => GSC_TABLE_TO_LOGICAL[k] !== null)),
|
|
148
|
+
tableKeyToName: (key) => GSC_TABLE_TO_LOGICAL[key],
|
|
141
149
|
mode: "superset"
|
|
142
150
|
});
|
|
143
151
|
const sqliteDialect = new SQLiteAsyncDialect();
|
|
@@ -170,10 +178,10 @@ function createSqliteResolverAdapter(options = {}) {
|
|
|
170
178
|
schema,
|
|
171
179
|
datasetToTableKey: {
|
|
172
180
|
pages: "gsc_pages",
|
|
173
|
-
|
|
174
|
-
|
|
181
|
+
queries: "gsc_keywords",
|
|
182
|
+
page_queries: "gsc_page_keywords",
|
|
175
183
|
countries: "gsc_countries",
|
|
176
|
-
|
|
184
|
+
dates: "gsc_devices",
|
|
177
185
|
search_appearance: "gsc_search_appearance",
|
|
178
186
|
hourly_pages: "gsc_hourly_pages"
|
|
179
187
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gscdump/engine-sqlite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.21.0",
|
|
5
5
|
"description": "SQLite / D1 engine adapter for @gscdump/analysis — typed analytics over sqlite-proxy executors (Cloudflare D1, libsql).",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"drizzle-orm": "^0.45.2"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"gscdump": "0.
|
|
48
|
-
"
|
|
47
|
+
"@gscdump/engine": "0.21.0",
|
|
48
|
+
"gscdump": "0.21.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"drizzle-orm": "^0.45.2",
|