diff --git a/public/administration-db.png b/public/administration-db.png
new file mode 100644
index 0000000..2d246c0
Binary files /dev/null and b/public/administration-db.png differ
diff --git a/public/administration-db.svg b/public/administration-db.svg
new file mode 100644
index 0000000..9c203f1
--- /dev/null
+++ b/public/administration-db.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/components/queryBuilder/BuilderHost.vue b/src/components/queryBuilder/BuilderHost.vue
index 1587334..1416864 100644
--- a/src/components/queryBuilder/BuilderHost.vue
+++ b/src/components/queryBuilder/BuilderHost.vue
@@ -34,6 +34,14 @@
+
+
+
-
+
+
+
+
@@ -108,7 +121,7 @@ export default defineComponent({
},
data() {
return {
- queryMode: "builder" as "builder" | "editor",
+ queryMode: "builder" as "builder" | "editor" | "structure",
};
},
computed: {
@@ -126,6 +139,7 @@ export default defineComponent({
this.fetchTableMetas();
},
methods: {
+ ...mapActions(useModalStore, ["openModal"]),
...mapActions(useQueryBuilderStore, ["fetchTableMetas"]),
clearQuery() {
this.$emit("update:model-value", undefined);
@@ -141,6 +155,9 @@ export default defineComponent({
this.value = "";
}
},
+ showStructure() {
+ this.openModal(markRaw(defineAsyncComponent(() => import("@/components/queryBuilder/StructureModal.vue"))));
+ },
},
});
diff --git a/src/components/queryBuilder/StructureModal.vue b/src/components/queryBuilder/StructureModal.vue
new file mode 100644
index 0000000..e833be0
--- /dev/null
+++ b/src/components/queryBuilder/StructureModal.vue
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/stores/admin/queryBuilder.ts b/src/stores/admin/queryBuilder.ts
index 567ef9d..c652d01 100644
--- a/src/stores/admin/queryBuilder.ts
+++ b/src/stores/admin/queryBuilder.ts
@@ -30,7 +30,11 @@ export const useQueryBuilderStore = defineStore("queryBuilder", {
});
},
sendQuery(offset = 0, count = 25) {
- if (this.query == undefined) return;
+ this.queryError = "";
+ this.data = [];
+ this.totalLength = 0;
+ if (this.query == undefined || this.query == "" || (typeof this.query != "string" && this.query.table == ""))
+ return;
this.loadingData = "loading";
http
.post(`/admin/querybuilder/query?offset=${offset}&count=${count}`, {