{"id":22883041,"url":"https://github.com/zuoqiu-yingyi/widget-query","last_synced_at":"2025-05-07T05:44:40.700Z","repository":{"id":38536108,"uuid":"457426086","full_name":"Zuoqiu-Yingyi/widget-query","owner":"Zuoqiu-Yingyi","description":"一个将思源笔记数据库查询结果以表格样式渲染的挂件 | A widget that renders the query results of the Siyuan Notes database in tabular style.","archived":false,"fork":false,"pushed_at":"2023-10-28T17:54:06.000Z","size":1783,"stargazers_count":49,"open_issues_count":7,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-14T03:08:29.349Z","etag":null,"topics":["query","siyuan","siyuan-note","sql","widget"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Zuoqiu-Yingyi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"ko_fi":"zuoqiu","custom":["https://afdian.net/a/zuoqiu"]}},"created_at":"2022-02-09T15:54:26.000Z","updated_at":"2024-04-13T04:08:25.000Z","dependencies_parsed_at":"2023-01-22T02:49:46.643Z","dependency_job_id":"bb111434-871b-4ecf-a4be-bc0c0deca9aa","html_url":"https://github.com/Zuoqiu-Yingyi/widget-query","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zuoqiu-Yingyi%2Fwidget-query","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zuoqiu-Yingyi%2Fwidget-query/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zuoqiu-Yingyi%2Fwidget-query/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zuoqiu-Yingyi%2Fwidget-query/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zuoqiu-Yingyi","download_url":"https://codeload.github.com/Zuoqiu-Yingyi/widget-query/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229585889,"owners_count":18096519,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["query","siyuan","siyuan-note","sql","widget"],"created_at":"2024-12-13T18:31:54.621Z","updated_at":"2024-12-13T18:31:55.555Z","avatar_url":"https://github.com/Zuoqiu-Yingyi.png","language":"JavaScript","funding_links":["https://ko-fi.com/zuoqiu","https://afdian.net/a/zuoqiu"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"./icon.png\" style=\"width: 8em; height: 8em;\"\u003e\n\n[![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/Zuoqiu-Yingyi/widget-query?include_prereleases\u0026style=flat-square)](https://github.com/Zuoqiu-Yingyi/widget-query/releases/latest)\n[![GitHub Release Date](https://img.shields.io/github/release-date/Zuoqiu-Yingyi/widget-query?style=flat-square)](https://github.com/Zuoqiu-Yingyi/widget-query/releases/latest)\n[![GitHub License](https://img.shields.io/github/license/Zuoqiu-Yingyi/widget-query?style=flat-square)](https://github.com/Zuoqiu-Yingyi/widget-query/blob/main/LICENSE)\n[![GitHub last commit](https://img.shields.io/github/last-commit/Zuoqiu-Yingyi/widget-query?style=flat-square)](https://github.com/Zuoqiu-Yingyi/widget-query/commits/main)\n![GitHub repo size](https://img.shields.io/github/repo-size/Zuoqiu-Yingyi/widget-query?style=flat-square)\n![hits](https://hits.b3log.org/Zuoqiu-Yingyi/widget-query.svg)\n[![GitHub all releases](https://img.shields.io/github/downloads/Zuoqiu-Yingyi/widget-query/total?style=flat-square)](https://github.com/Zuoqiu-Yingyi/widget-query/releases)\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\n---\n[简体中文](./README_zh_CN.md) \\| English\n\n\u003c/div\u003e\n\n---\n# widget-query\n\nA widget that renders the query results of the Siyuan Notes database in tabular style.\n\nIt is now on the shelves of the [Siyuan Notes Community Bazaar](https://github.com/siyuan-note/bazaar). If you like this widget, welcome to light up ⭐ for this project!\n\n\n## PREVIEW\n\n![preview](./preview.png)\n\nBackground color status indication:\n\n* White:\n\n  * Initialization.\n  * Processing query.\n* Green:\n\n  * Query success.\n* Blue:\n\n  * Please continue to operate.\n* Yellow:\n\n  * Query result is empty.\n* Red:\n\n  * SQL SQL statement error.\n  * Unknown error.\n\n## FUNCTION\n\n1. Click the Auto query check box to automatically query once the next time you open the page.\n2. Set custom attribute \u003ckbd\u003einput\u003c/kbd\u003e for a widget block can specify the content of a SQL code block or an embedded block as a query statement.\n\n    * For example, in other documents there is a code block or an embedded block ID which ID is `20220418210605-ibussa1`, then set the custom block attribute \u003ckbd\u003einput\u003c/kbd\u003e: `20220418210605-ibussa1` for the widget block can reference the block's SQL statement for query.\n    * Only if the pre-block of the widget block is not a code block with the custom attribute \u003ckbd\u003etype\u003c/kbd\u003e: `query-code`.\n3. Set custom attribute \u003ckbd\u003eoutput\u003c/kbd\u003e for a widget block can specify a table block as a display block for query results.\n\n    * For example, in other documents there is a table block ID which ID is `20220604112815-sfiwyi7`, then set the custom block attribute \u003ckbd\u003eoutput\u003c/kbd\u003e: `20220604112815-sfiwyi7` for the widget block can render the query results into the table.\n    * Only if the post-block of the widget block is not a table block with the custom attribute \u003ckbd\u003etype\u003c/kbd\u003e: `query-table`.\n4. SQL statements that conform to the regular expression `^\\s*SELECT\\s+\\*\\s+FROM\\s+blocks\\s+.*` will enable the default block query mode.\n\n    * This regular expression is configured in `config.query.regs.blocks` in `/src/script/module/config.js`\n    * Example: `SELECT * FROM blocks WHERE content LIKE '%Content block%'`\n    * In this mode, the query result rendering style is controlled with the following configuration options.\n\n      | Field                                   | Field Description                                                                                                                                                                                                                                                                  | Field Value                                                                                | Field Value Description                                                                                  |\n      | --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------- |\n      | `config.query.render.*`                 | Define the rendering style of certain fields.\u003cbr /\u003eHyperlink style is like `[anchor text](siyuan://blocks/block)`, which will not be displayed in the backlink panel.\u003cbr /\u003eBlock reference style is like `((block \"anchor text\"))`, which will be displayed in the backlink panel. | `'link'`\u003cbr /\u003e`'ref'`                                                                      | Render the field in hyperlink style.\u003cbr /\u003eRender the field in block reference style.                     |\n      | `config.query.render.ial.shape`         | Define the arrangement method of the block attribute list `IAL`.\u003cbr /\u003eDisplay in rows within a column.\u003cbr /\u003eDisplay in columns within a row.                                                                                                                                       | `'rows'`\u003cbr /\u003e`'columns'`                                                                  |                                                                                                          |\n      | `config.query.render.ial.fields.forced` | Define the forced rendering attribute names of `IAL`. If the array is empty, use the blacklist/whitelist to control.                                                                                                                                                               | `['attribute name', ...]`                                                                  |                                                                                                          |\n      | `config.query.render.ial.fields.ignore` | Define the attribute names of `IAL` that should not be rendered (blacklist). Higher priority than whitelist.                                                                                                                                                                       | `['attribute name', ...]`                                                                  |                                                                                                          |\n      | `config.query.render.ial.fields.ignore` | Define the attribute names of `IAL` that can be rendered (whitelist). If empty, render all fields except for those on the blacklist.                                                                                                                                               | `['attribute name', ...]`                                                                  |                                                                                                          |\n      | `config.query.limit`                    | Define the display style of the query results for the `content` or `markdown` fields.                                                                                                                                                                                              | `null`\u003cbr /\u003e`'row'`\u003cbr /\u003e`'len'`                                                           | No limit.\u003cbr /\u003eLimit by number of rows. \u003cbr /\u003eLimit by length.                                           |\n      | `config.query.maxlen`                   | Define the maximum length of the query result for the `content` or `markdown` field.                                                                                                                                                                                               | Positive integer.                                                                          | Enabled when `config.query.limit: 'len'` is set.                                                         |\n      | `config.query.maxrow`                   | Define the maximum number of rows of the query result for the `content` or `markdown` field.                                                                                                                                                                                       | Positive integer.                                                                          | Enabled when `config.query.limit: 'row'` is set.                                                         |\n      | `config.query.fields`                   | Define the fields to be displayed in the query results and their order of arrangement.                                                                                                                                                                                             | `['field name', ...]`                                                                      | See details for field names in [blocks](https://www.yuque.com/siyuannote/docs/go7uom#276bd8cf)           |\n      | `config.query.style.table.attributes`   | Define the block attributes of the query result table, which can be used to set custom styles.                                                                                                                                                                                     | `[{enable: true/false, key: 'block attribute name', value: 'block attribute value'}, ...]` |                                                                                                          |\n      | `config.query.style.column.*`           | Define the style of a column in the query result table.                                                                                                                                                                                                                            | `{: style=\"width: 512px\"}`                                                                 | Specify the width of a column in the query result.                                                       |\n      | `config.query.style.align.*`            | Define the alignment of a column in the query result table.                                                                                                                                                                                                                        | `:-`\u003cbr /\u003e`:-:`\u003cbr /\u003e`-:`                                                                  | Left-align a column. \u003cbr /\u003eCenter-align a column. \u003cbr /\u003eRight-align a column.                            |\n      | `config.query.filter.blocks`            | Define a filter sequence to filter out some query results.                                                                                                                                                                                                                         | `{enable: true/flase, handlers: [(row, data) =\u003e {}, ...]}`                                 | Return `true` for items that need to be filtered out; return `false` for items that need to be retained. |\n      | `config.query.handler.*`                | Define the processing function of a specific field value.                                                                                                                                                                                                                          | `(row, ial) =\u003e {}`                                                                         | `row`: current record. \u003cbr /\u003e`ial`: the inline attribute list parsed from the current query record.      |\n      | `config.query.map.*`                    | Query result mapping table, replace some query result field values with human-readable fields.                                                                                                                                                                                     |                                                                                            |                                                                                                          |\n4. Queries that do not conform to the \u003ckbd\u003edefault block query mode\u003c/kbd\u003e are \u003ckbd\u003enormal query mode\u003c/kbd\u003e\n\n    * Example:\n\n      * Query the help document `请从这里开始` and all of its subordinate documents.\n\n        ```sql\n        SELECT\n            '[' || b.content || '](siyuan://blocks/' || b.id || ')' AS __1____pre__文档标题,\n            b.hpath AS __2__文档路径\n        FROM\n            blocks AS b\n        WHERE\n            b.type = 'd'\n            AND b.hpath LIKE '%请从这里开始%'\n        ORDER BY\n            b.path\n        LIMIT 10\n        ```\n\n        |      | Document Title                                                                                | Document Path                                                                         |\n        | ---: | :-------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------ |\n        |    1 | [Getting Started](siyuan://blocks/20200812220555-lj3enxa)                                     | `/Getting Started`                                                                    |\n        |    2 | [Editor](siyuan://blocks/20210808180320-abz7w6k)                                              | `/Getting Started/Editor`                                                             |\n        |    3 | [Layout Elements](siyuan://blocks/20200825162036-4dx365o)                                     | `/Getting Started/Editor/Layout Elements`                                             |\n        |    4 | [Content Blocks](siyuan://blocks/20210808180320-fqgskfj)                                      | `/Getting Started/Content Blocks`                                                     |\n        |    5 | [What are Content Blocks?](siyuan://blocks/20200813004931-q4cu8na)                            | `/Getting Started/Content Blocks/What are Content Blocks?`                            |\n        |    6 | [Referencing Content Blocks](siyuan://blocks/20200813013559-sgbzl5k)                          | `/Getting Started/Content Blocks/Referencing Content Blocks`                          |\n        |    7 | [Navigating within Content Blocks](siyuan://blocks/20200813131152-0wk5akh)                    | `/Getting Started/Content Blocks/Navigating within Content Blocks`                    |\n        |    8 | [Content Block Types](siyuan://blocks/20200905090211-2vixtlf)                                 | `/Getting Started/Content Blocks/Content Block Types`                                 |\n        |    9 | [Embedding Content Blocks](siyuan://blocks/20201117101902-2ewjjum)                            | `/Getting Started/Content Blocks/Embedding Content Blocks`                            |\n        |   10 | [Converting between Document Blocks and Title Blocks](siyuan://blocks/20201210103036-1x3vm8t) | `/Getting Started/Content Blocks/Converting between Document Blocks and Title Blocks` |\n\n      * Query all tables in Siyuan database.\n\n        ```sql\n        SELECT\n            *\n        FROM\n            sqlite_master\n        ```\n\n        |      | name                   | rootpage | sql                                                                                                                                                              | tbl_name               | type    |\n        | ---: | :--------------------- | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------- | :------ |\n        |    1 | `stat`                 | `2`      | `CREATE TABLE stat (key, value)`                                                                                                                                 | `stat`                 | `table` |\n        |    2 | `blocks`               | `3`      | `CREATE TABLE blocks (id, parent_id, root_id, hash, box, path, hpath, name, alias, memo, content, markdown, length, type, subtype, ial, sort, created, updated)` | `blocks`               | `table` |\n        |    3 | `spans`                | `4`      | `CREATE TABLE spans (id, block_id, root_id, box, path, content, markdown, type, ial)`                                                                            | `spans`                | `table` |\n        |    4 | `assets`               | `5`      | `CREATE TABLE assets (id, block_id, root_id, box, docpath, path, name, title, hash)`                                                                             | `assets`               | `table` |\n        |    5 | `attributes`           | `6`      | `CREATE TABLE attributes (id, name, value, type, block_id, root_id, box, path)`                                                                                  | `attributes`           | `table` |\n        |    6 | `refs`                 | `7`      | `CREATE TABLE refs (id, def_block_id, def_block_parent_id, def_block_root_id, def_block_path, block_id, root_id, box, path, content, markdown, type)`            | `refs`                 | `table` |\n        |    7 | `file_annotation_refs` | `8`      | `CREATE TABLE file_annotation_refs (id, file_path, annotation_id, block_id, root_id, box, path, content, type)`                                                  | `file_annotation_refs` | `table` |\n      * Query all fields in the `blocks` table of Siyuan database.\n\n        ```sql\n        PRAGMA table_info('blocks')\n        ```\n\n        |      | cid  | dflt_value | name        | notnull | pk   | type |\n        | ---: | :--- | :--------- | :---------- | :------ | :--- | :--- |\n        |    1 |      |            | `id`        |         |      |      |\n        |    2 | `1`  |            | `parent_id` |         |      |      |\n        |    3 | `2`  |            | `root_id`   |         |      |      |\n        |    4 | `3`  |            | `hash`      |         |      |      |\n        |    5 | `4`  |            | `box`       |         |      |      |\n        |    6 | `5`  |            | `path`      |         |      |      |\n        |    7 | `6`  |            | `hpath`     |         |      |      |\n        |    8 | `7`  |            | `name`      |         |      |      |\n        |    9 | `8`  |            | `alias`     |         |      |      |\n        |   10 | `9`  |            | `memo`      |         |      |      |\n        |   11 | `10` |            | `content`   |         |      |      |\n        |   12 | `11` |            | `markdown`  |         |      |      |\n        |   13 | `12` |            | `length`    |         |      |      |\n        |   14 | `13` |            | `type`      |         |      |      |\n        |   15 | `14` |            | `subtype`   |         |      |      |\n        |   16 | `15` |            | `ial`       |         |      |      |\n        |   17 | `16` |            | `sort`      |         |      |      |\n        |   18 | `17` |            | `created`   |         |      |      |\n        |   19 | `18` |            | `updated`   |         |      |      |\n      * Customized property views.\n\n        ```sql\n        SELECT\n            '[' || b.content || '](siyuan://blocks/' || a.block_id || ')' AS __1____pre__Title,\n            MAX(\n                CASE\n                    WHEN a.name = 'name' THEN a.value\n                    ELSE NULL\n                END\n            ) AS __2____kbd__Name,\n            MAX(\n                CASE\n                    WHEN a.name = 'alias' THEN REPLACE(\n                        '\u003ckbd\u003e' || a.value || '\u003c/kbd\u003e',\n                        ',',\n                        '\u003c/kbd\u003e\u003cbr/\u003e\u003ckbd\u003e'\n                    )\n                    ELSE NULL\n                END\n            ) AS __3____pre__Alias,\n            MAX(\n                CASE\n                    WHEN a.name = 'memo' THEN REPLACE(\n                        '\u003ckbd\u003e' || a.value || '\u003c/kbd\u003e',\n                        ',',\n                        '\u003c/kbd\u003e\u003cbr/\u003e\u003ckbd\u003e'\n                    )\n                    ELSE NULL\n                END\n            ) AS __3____pre__Memo\n        FROM\n            attributes AS a\n            INNER JOIN blocks AS b ON a.block_id = b.id\n        WHERE\n            (\n                a.name = 'name'\n                OR a.name = 'alias'\n                OR a.name = 'memo'\n            )\n            AND b.type = 'd'\n        GROUP BY\n            a.block_id\n        ORDER BY\n            RANDOM()\n        LIMIT\n            10;\n        ```\n\n        ![Customize properties view](./image/README/1649676356928.png)  \n    * Use field aliases prefix to define query display styles.\n\n      * `__hidden__alias0`:\n\n        * This field does not appear in the query results.\n      * `__ref__alias1`:\n\n        * The field is rendered as a block reference.\n        * example: `((\u003cvalue\u003e \"\u003cvalue\u003e\"))`\n      * `__link__alias2`:\n\n        * The field is rendered as a block link.\n        * example: `[\u003cvalue\u003e](siyuan://blocks/\u003cvalue\u003e)`\n      * `__raw__alias3`:\n\n        * The field is rendered as the original value (inline code style).\n        * example: ``\u003cvalue\u003e``\n      * `__date__alias4`:\n\n        * The field is rendered as a date.\n        * example: `yyyy-MM-dd`\n      * `__time__alias5`:\n\n        * The field is rendered as a time.\n        * example: `HH:mm:ss`\n      * `__datetime__alias6`:\n\n        * The field is rendered as a datetime.\n        * example: `yyyy-MM-dd HH:mm:ss`\n      * `___s__alias7`:\n\n        * The field is rendered as strikethrough.\n        * example: `~~\u003cvalue\u003e~~`\n      * `___u__alias8`:\n\n        * The field is rendered as underline.\n        * example: `\u003cu\u003e\u003cvalue\u003e\u003c/u\u003e`\n      * `___em__alias9`:\n\n        * The field is rendered as emphasis.\n        * example: `*\u003cvalue\u003e*`\n      * `__tag__alias10`:\n\n        * The field is rendered as tag.\n        * example: `\u003ckbd\u003e\u003cvalue\u003e\u003c/kbd\u003e`\n      * `__kbd__alias11`:\n\n        * The field is rendered as keyboard.\n        * example: `~\u003cvalue\u003e~`\n      * `__sub__alias12`:\n\n        * The field is rendered as subscript.\n        * example: `^\u003cvalue\u003e^`\n      * `__sup__alias13`:\n\n        * The field is rendered as superscript.\n        * example: `#\u003cvalue\u003e#`\n      * `__code__alias14`:\n\n        * The field is rendered as inline code.\n        * example: ``\u003cvalue\u003e``\n      * `__mark__alias15`:\n\n        * The field is rendered as mark.\n        * example: `==\u003cvalue\u003e==`\n      * `__math__alias16`:\n\n        * The field is rendered as math formula.\n        * example: `$\u003cvalue\u003e$`\n      * `__strong__alias17`:\n\n        * The field is rendered as weightbold.\n        * example: `**\u003cvalue\u003e**`\n      * `__pre__alias7`:\n\n        * The field is rendered as a preview (rendering the markdown row-level identifier).\n        * example: `\u003cvalue\u003e`\n    * Use field aliases prefix to define query result field order.\n\n      * `__\u003cnumber\u003e__alias8`:\n\n        * The field can be placed in front of the query style prefix field.\n        * example:\n\n          * `__1____pre__alias9`\n          * `__02____raw__alias10`\n    * Displays the original value of the query result by default (using inline code).\n    * Example of a field alias prefix\n\n      * ```sql\n        SELECT\n            b.id AS __00____ref__ref,\n            b.id AS __01____link__link,\n            b.id AS __02____pre__pre,\n            b.id AS __03____raw__raw,\n            b.created AS __04____date__date,\n            b.created AS __05____time__time,\n            b.created AS __06____datetime__datetime,\n            b.id AS __07____s__s,\n            b.id AS __08____u__u,\n            b.id AS __09____em__em,\n            b.id AS __10____tag__tag,\n            b.id AS __11____kbd__kbd,\n            b.id AS __12____sub__sub,\n            b.id AS __13____sup__sup,\n            b.id AS __14____code__code,\n            b.id AS __15____mark__mark,\n            b.id AS __16____math__math,\n            b.id AS __17____strong__strong\n        FROM\n            blocks AS b\n        WHERE\n            id = '.root{.id}'\n        ```\n\n        ![Example of a field alias prefix](./image/README/1648568044659.png)\n5. Partial template field parsing support\n\n    * `.\u003cprefix\u003e{.\u003cfield\u003e}`\n\n      * `\u003cprefix\u003e`: prefix field\n\n        * `block`: Widget block.\n        * `parent`: The parent block of the pendant block.\n        * `root`: The document block in which the pendant block resides.\n      * `\u003cfield\u003e`: attribute field\n\n        * The field name of the `blocks` table in the database.\n      * Example: `SELECT * FROM blocks WHERE id = '.root{.id}' content LIKE '%content blocks%'`\n\n        * Equivalent to `SELECT * FROM blocks WHERE id = '.block{.root_id}' content LIKE '%content blocks%'`\n        * Query all blocks in the document where the pendant is located that contain the word `content blocks`\n\n## CUSTOM CONFIG\n\n### GLOBAL CUSTOM CONFIG\n\n1. Create a file `\u003cworkspace\u003e/data/widgets/custom.js`\n2. The value defined in file `\u003cworkspace\u003e/data/widgets/custom.js` overwrites the corresponding value in file `\u003cworkspace\u003e/data/widgets/Query/src/script/module/config.js`.\n\n#### CONFIG EXAMPLE\n\n```js\n/**\n * File Path\n *    \u003cworkspace\u003e/data/widgets/custom.js\n * Example function:\n *    Block attributes are displayed in columns in the default block query results.\n */\n\nexport const config = {\n    query: {\n        render: {\n            ial: {\n                shape: 'columns',\n            },\n        },\n    },\n};\n\n```\n\nFor more configuration items, see [config.js](./src/script/module/config.js)\n\n### BLOCK CUSTOM CONFIG\n\n* Set custom block attributes in the widget block(the Query button in your note).\n\n  * Custom block attribute names are property in the `config` object under the file `src/script/module/config.js`.\n  * For example, if you want to customize the query result field list, you can set the custom block attribute `query-fields`: `[\"hpath\", \"type\", \"markdown\"]`, where the `config.query.fields` property will be replaced in this block.\n\n## START\n\nThe widget has been put on the shelves at [SiYuan community bazaar](https://github.com/siyuan-note/bazaar) and can be installed directly in the Bazaar.\n\n## REFERENCE \u0026 THANKS\n\n| Author                                          | Project                                                           | License   |\n| :---------------------------------------------- | :---------------------------------------------------------------- | :-------- |\n| **[leolee9086](https://github.com/leolee9086)** | [leolee9086/cc-baselib](https://github.com/leolee9086/cc-baselib) | *Unknown* |\n\nPS: Sort in no particular order.\n\n## CONTRIBUTORS\n\n\u003c!-- [![CONTRIBUTOR](https://contrib.rocks/image?repo=Zuoqiu-Yingyi/widget-query)](https://github.com/Zuoqiu-Yingyi/widget-query/graphs/contributors) --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/leolee9086\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/19915077?v=4?s=100\" width=\"100px;\" alt=\"leolee9086\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eleolee9086\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/Zuoqiu-Yingyi/widget-query/issues?q=author%3Aleolee9086\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"https://github.com/Zuoqiu-Yingyi/widget-query/commits?author=leolee9086\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/jpanda-cn\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/50101020?v=4?s=100\" width=\"100px;\" alt=\"jpanda-cn\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ejpanda-cn\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/Zuoqiu-Yingyi/widget-query/commits?author=jpanda-cn\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#ideas-jpanda-cn\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://www.cnblogs.com/duanguyuan/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/5968678?v=4?s=100\" width=\"100px;\" alt=\"Wang Yong\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eWang Yong\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/Zuoqiu-Yingyi/widget-query/commits?author=whuwangyong\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/banjuer\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/18739609?v=4?s=100\" width=\"100px;\" alt=\"banjuer\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ebanjuer\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-banjuer\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/Tlonglan\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/38731172?v=4?s=100\" width=\"100px;\" alt=\"Tlonglan\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eTlonglan\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-Tlonglan\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://git.io/k.r\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/2762704?v=4?s=100\" width=\"100px;\" alt=\"Tim Zhang\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eTim Zhang\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-ttimasdf\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/Zuoqiu-Yingyi/widget-query/commits?author=ttimasdf\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/lmmxj\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/13883162?v=4?s=100\" width=\"100px;\" alt=\"lmmxj\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003elmmxj\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-lmmxj\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/frostime\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/27268127?v=4?s=100\" width=\"100px;\" alt=\"Frostime\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eFrostime\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/Zuoqiu-Yingyi/widget-query/commits?author=frostime\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nPS: The table is generated automatically using [All Contributors · GitHub](https://github.com/all-contributors), go to [emoji key](https://allcontributors.org/docs/en/emoji-key) to see the contribution type.\n\n## CHANGE LOG\n\n[CHANGE LOG](./CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzuoqiu-yingyi%2Fwidget-query","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzuoqiu-yingyi%2Fwidget-query","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzuoqiu-yingyi%2Fwidget-query/lists"}