Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit bf67d09

Browse files
committed
new mayor version
1 parent ba139a9 commit bf67d09

File tree

7 files changed

+32
-3
lines changed

7 files changed

+32
-3
lines changed

docs/docs/changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
## 2.8.0
33
### Shiny new things
44
- Added video examples to the docs for each section [imeed166](https://github.com/imeed166)
5+
- Relation/Rollups arrives! Now you can create a relation between two models and use it to create a rollup. Both with its own column properties. [ISSUE#53](https://github.com/RafaelGB/obsidian-db-folder/issues/53)
6+
- `db.dataview` and `db.rollup` functions were included to use in your formulas. dataview returns the API of the dv plugin and rollup returns the predefined functions of dbfolder rollups (check [documentation](https://rafaelgb.github.io/obsidian-db-folder/features/Formulas/#exposed-variables))
7+
### Visual
8+
- formula textarea size calculated in funcion of length [ISSUE#518](https://github.com/RafaelGB/obsidian-db-folder/issues/518)
9+
### No longer broken
10+
- enter key listener bug for search input removed [ISSUE#546](https://github.com/RafaelGB/obsidian-db-folder/issues/546)
11+
- add multiple tags at the same time do not cause a concurrency problem [ISSUE#555](https://github.com/RafaelGB/obsidian-db-folder/issues/555)
512
## 2.7.4
613
### Shiny new things
714
- names of tags are now editable (updating all the related rows) [ISSUE#443](https://github.com/RafaelGB/obsidian-db-folder/issues/443)

docs/docs/features/Formulas.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ To use an exposed variable, use the `${}` syntax. For example, to get the value
2525
The root object `db` has the following functions:
2626

2727
- `js` : execute a javascript function that you previously defined in the `js` folder of your table in the database or plugin global settings. (I.E.: `db.js.myFunction( arg1, arg2)`)
28+
- `dataview`: expose the dataview API. (see [Dataview API](https://github.com/blacksmithgu/obsidian-dataview/blob/master/src/api/plugin-api.ts))
29+
- `rollup`: expose the rollup functions of the dbfolder plugin. (see [Rollup documentation](/features/Relations/#rollups))
2830

2931
## Examples
3032

docs/docs/features/Relations.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Database relations
2+
3+
### Introduction
4+
Relations are a very important part of any database. They allow you to model complex relationships between your data. For example, a `User` can have many `Post`s, and a `Post` can have many `Comment`s. This is a one-to-many relationship. You can also have many-to-many relationships, where a `User` can have many `Post`s, and a `Post` can have many `User`s.
5+
6+
### How to use
7+
8+
To create a relation, you need to create a column with the `Relation` type. You can then select the table you want to relate to. You can also select the column you want to use as the relation key as `Rollup`. This is the column that will be used to match the rows. For example, if you have a `User` table with a `Name` column, and a `Post` table with an `Author` column, you can use the `Name` column as the relation key.
9+
10+
## Rollups
11+
12+
Once you create a relation, you can use the `rollup` function to get the related rows. For example, if you have a `User` table with a `Name` column, and a `Post` table with an `Author` column, you can use the `rollup` function to get all the posts for a given user.
13+
14+
### Methods
15+
- Original value: shows the original value of the column as a list separated by commas.
16+
- Summatory: Sum all the values of a column.
17+
- Count All: Count all the values informed in a column.
18+
19+
See also [Rollup API](https://github.com/RafaelGB/obsidian-db-folder/blob/master/src/automations/Rollup.ts)

docs/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ nav:
99
- Properties: "features/Properties.md"
1010
- Notes: "features/Notes.md"
1111
- Viewing data: "features/Viewing data.md"
12+
- Relations: "features/Relations.md"
1213
- Formulas: "features/Formulas.md"
1314
- About: "about.md"
1415
- FAQ: "faq.md"

manifest-beta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "dbfolder",
33
"name": "DB Folder",
4-
"version": "2.7.4",
4+
"version": "2.8.0",
55
"minAppVersion": "0.16.3",
66
"description": "Folder with the capability to store and retrieve data from a folder like database",
77
"author": "RafaelGB",

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "dbfolder",
33
"name": "DB Folder",
4-
"version": "2.7.4",
4+
"version": "2.8.0",
55
"minAppVersion": "0.16.3",
66
"description": "Folder with the capability to store and retrieve data from a folder like database",
77
"author": "RafaelGB",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "obsidian-dbfolder",
3-
"version": "2.7.4",
3+
"version": "2.8.0",
44
"description": "This is a sample plugin for Obsidian (https://obsidian.md)",
55
"main": "main.js",
66
"scripts": {

0 commit comments

Comments
 (0)