Skip to content

Commit 2bbaa5a

Browse files
authored
Merge pull request #31 from Paulanerus/dev
Dev
2 parents 35e0526 + 82639c5 commit 2bbaa5a

21 files changed

Lines changed: 356 additions & 10 deletions

File tree

.readthedocs.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-24.04
5+
tools:
6+
python: "3.13"
7+
8+
sphinx:
9+
configuration: docs/conf.py
10+
11+
python:
12+
install:
13+
- requirements: docs/requirements.txt

core/src/main/kotlin/dev/paulee/core/data/DataServiceImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ class DataServiceImpl : IDataService {
479479
linkEntries.values.flatMap { (source, field) ->
480480
val ids = dataPool.storageProvider.get(
481481
source, whereClause = listOf("${preFilter.linkKey}:$linkValue")
482-
).mapNotNull { it[field]?.let { id -> "$field:$id" } }
482+
).mapNotNull { it[field]?.let { id -> "$field:$id" } }.distinct()
483483

484484
val transformKey = preFilter.key
485485

core/src/main/kotlin/dev/paulee/core/data/sql/Database.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,14 @@ import java.sql.DriverManager
1212
import kotlin.io.path.createDirectories
1313

1414
private enum class ColumnType {
15-
TEXT, INTEGER, REAL, NUMERIC, UNKNOWN
15+
TEXT, INTEGER, REAL
1616
}
1717

1818
private fun typeToColumnType(type: FieldType): ColumnType = when (type) {
1919
FieldType.TEXT -> ColumnType.TEXT
2020
FieldType.INT -> ColumnType.INTEGER
2121
FieldType.FLOAT -> ColumnType.REAL
22-
FieldType.BOOLEAN -> ColumnType.NUMERIC
23-
else -> ColumnType.UNKNOWN
22+
FieldType.BOOLEAN -> ColumnType.TEXT
2423
}
2524

2625
private data class Column(val name: String, val type: ColumnType, val primary: Boolean, val nullable: Boolean) {

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
%SPHINXBUILD% >NUL 2>NUL
14+
if errorlevel 9009 (
15+
echo.
16+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17+
echo.installed, then set the SPHINXBUILD environment variable to point
18+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
19+
echo.may add the Sphinx directory to PATH.
20+
echo.
21+
echo.If you don't have Sphinx installed, grab it from
22+
echo.https://www.sphinx-doc.org/
23+
exit /b 1
24+
)
25+
26+
if "%1" == "" goto help
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

docs/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sphinx-rtd-theme
2+
myst-parser
92.4 KB
Loading
32.4 KB
Loading

docs/source/_static/diff_view.png

51.8 KB
Loading
38.8 KB
Loading

0 commit comments

Comments
 (0)