From 864ef2611829bc2117b5d5167594c45012229105 Mon Sep 17 00:00:00 2001 From: liufree Date: Thu, 24 Apr 2025 00:11:48 +0800 Subject: [PATCH 1/2] feat: support group by --- src/pages/GenerateColumns.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/GenerateColumns.tsx b/src/pages/GenerateColumns.tsx index a297baf..1fdeac6 100644 --- a/src/pages/GenerateColumns.tsx +++ b/src/pages/GenerateColumns.tsx @@ -8,8 +8,8 @@ export function formatValue( } // console.log("format value", value); if (Array.isArray(value)) { - value.map((v) => (typeof v === "object" ? formatObject(v) : v)); - res = {type: "array", display: value}; + const formattedValues = value.map((v) => (typeof v === "object" ? formatObject(v) : v)); + res = {type: "array", display: formattedValues}; } else if (typeof value === "object") { res = formatObject(value); } else { @@ -21,7 +21,7 @@ export function formatValue( function formatObject(value: any) { const type =value.type; if(type==='file') { - const fileName = value.path.split('/').pop()?.split('.')[0]; + const fileName = value.path.replace(/\.md$/, ''); return {type: "link", path: value.path, display: fileName}; } From 9e2fdd4253c3af465b9b7bfc5d0707858ea93840 Mon Sep 17 00:00:00 2001 From: liufree Date: Thu, 24 Apr 2025 00:12:37 +0800 Subject: [PATCH 2/2] feat: support group by --- README-zh.md | 2 +- README.md | 2 +- manifest.json | 2 +- package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README-zh.md b/README-zh.md index c5cd5c7..4f4092a 100644 --- a/README-zh.md +++ b/README-zh.md @@ -8,7 +8,7 @@ QueryDash的目标是开发一款类似Notion Database的Obsidian插件,但不 **现有功能** 1. **多视图支持**:提供表格和列表两种视图,满足不同场景需求。 -2. **Dataview SQL支持**:兼容Dataview的SQL语法(暂不支持`GROUP BY`)。 +2. **Dataview SQL支持**:兼容Dataview的SQL语法。 3. **增强功能**: - **搜索**:快速定位所需内容。 - **过滤**:根据条件筛选数据。 diff --git a/README.md b/README.md index 9d62d9e..50255e0 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ In the future, it will gradually expand with more practical features to help use **Current Features** 1. **Multi-view Support**: Provides table and list views to meet different scenario needs. -2. **Dataview SQL Support**: Compatible with Dataview's SQL syntax (currently does not support `GROUP BY`). +2. **Dataview SQL Support**: Compatible with Dataview's SQL syntax . 3. **Enhanced Features**: - **Search**: Quickly locate the content you need. - **Filter**: Screen data based on conditions. diff --git a/manifest.json b/manifest.json index f455aa3..f153ddb 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "querydash", "name": "QueryDash", - "version": "1.0.1", + "version": "1.0.2", "minAppVersion": "1.8.0", "description": "Refer to Dataview and add search, sorting, and pagination functions, just like Notion.", "author": "lwx", diff --git a/package.json b/package.json index ba99198..94f1c88 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-querydash", - "version": "1.0.1", + "version": "1.0.2", "description": "Refer to Dataview and add search, sorting, and pagination functions, just like Notion.", "main": "main.js", "scripts": {