Merge pull request #9 from liufree/dev

feat: support group by
This commit is contained in:
liufree 2025-04-24 00:13:29 +08:00 committed by GitHub
commit 76be4b8817
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 7 additions and 7 deletions

View file

@ -8,7 +8,7 @@ QueryDash的目标是开发一款类似Notion Database的Obsidian插件但不
**现有功能**
1. **多视图支持**:提供表格和列表两种视图,满足不同场景需求。
2. **Dataview SQL支持**兼容Dataview的SQL语法(暂不支持`GROUP BY`
2. **Dataview SQL支持**兼容Dataview的SQL语法。
3. **增强功能**
- **搜索**:快速定位所需内容。
- **过滤**:根据条件筛选数据。

View file

@ -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.

View file

@ -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",

View file

@ -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": {

View file

@ -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};
}