Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/2024 07 renewal of documentation #253

Merged
merged 181 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
3eb2218
Fixed ja index.md
takapi327 Jul 1, 2024
3958d50
Create 01-Program
takapi327 Jul 3, 2024
07e473b
Create 02-Program
takapi327 Jul 3, 2024
3ad5e52
Create 03-Program
takapi327 Jul 3, 2024
19b8b4c
Create 00-Setup
takapi327 Jul 3, 2024
3ad04c5
Fixed docs dependsOn package
takapi327 Jul 3, 2024
78d6de6
Create 04-Program
takapi327 Jul 3, 2024
ec1efd0
Fixed Program code
takapi327 Jul 3, 2024
57d7df4
Create 01-Migration-Notes document
takapi327 Jul 5, 2024
027ab3c
Create 02-Connection document
takapi327 Jul 5, 2024
19d0aae
Create 03-Connecting-to-a-Database document
takapi327 Jul 5, 2024
e9a4281
Create 04-Parameterized-Queries document
takapi327 Jul 5, 2024
b98332c
Create 05-Selecting-Data.md document
takapi327 Jul 5, 2024
189cf33
Create 07-Error-Handling document
takapi327 Jul 5, 2024
b0b789b
Create 07-Error-Handling document
takapi327 Jul 5, 2024
21b7bb1
Create 08-Logging document
takapi327 Jul 5, 2024
540a0a1
Create 09-Custom-Data-Type document
takapi327 Jul 5, 2024
988bcce
Create 10-Query-Builder document
takapi327 Jul 5, 2024
69a595e
Create 11-Schema document
takapi327 Jul 5, 2024
3f1e107
Fixed Program
takapi327 Jul 5, 2024
9285749
Fixed docs
takapi327 Jul 5, 2024
18ea306
Merge branch 'master' of github.com:takapi327/ldbc into documentation…
takapi327 Jul 7, 2024
d284c02
Update 07-Error-Handling
takapi327 Jul 7, 2024
d0ed01d
Delete unused
takapi327 Jul 7, 2024
1696b46
Rename old document
takapi327 Jul 7, 2024
31487d1
Replace custom data type document into 11-Schema
takapi327 Jul 7, 2024
4cf2a41
Fixed scalacOptions settings
takapi327 Jul 7, 2024
3738f09
Create 05-Program
takapi327 Jul 7, 2024
c8ba3fb
Fixed docs programs
takapi327 Jul 7, 2024
507cb38
Added type alias export
takapi327 Jul 7, 2024
9c813df
Fixed document
takapi327 Jul 7, 2024
f531aa7
Action sbt scalafmtAll
takapi327 Jul 7, 2024
36ba76c
Fixed docs project scalacOptions
takapi327 Jul 8, 2024
8e921b5
Delete unused
takapi327 Jul 8, 2024
60bdba8
Addeed AutomateHeaderPlugin in docs project
takapi327 Jul 8, 2024
b4257e5
Added auto generated header
takapi327 Jul 8, 2024
4490325
Change docs Setup program
takapi327 Jul 9, 2024
fec0986
Added Scala CLI build file ignore settings
takapi327 Jul 9, 2024
66977c1
Change Setup Scala CLI command
takapi327 Jul 9, 2024
00a5770
Delete unused
takapi327 Jul 10, 2024
6f05a34
Create 0X-Cleanup
takapi327 Jul 10, 2024
1ad5073
Fixed mdoc index.md
takapi327 Jul 10, 2024
05c7fae
Change comment
takapi327 Jul 10, 2024
b6da1de
Change setup docs
takapi327 Jul 10, 2024
9d6dde6
Fixed index.md
takapi327 Jul 13, 2024
f0b170d
Added Migration Notes document
takapi327 Jul 13, 2024
5de2b5a
Fixed migrate title
takapi327 Jul 14, 2024
1b59670
Added sbt-typelevel-site plugin
takapi327 Jul 18, 2024
9b73c71
Change docs build settings to sbt-typelevel
takapi327 Jul 18, 2024
9c55680
Create default.template.html for Laika
takapi327 Jul 18, 2024
88258b3
Create index.md
takapi327 Jul 18, 2024
28db385
Create img directory
takapi327 Jul 18, 2024
f0ad679
Create ja document directory
takapi327 Jul 18, 2024
2ebd4df
Create en document directory
takapi327 Jul 18, 2024
b7411eb
Action sbt scalafmtSbt
takapi327 Jul 18, 2024
352941e
Action sbt githubWorkflowGenerate
takapi327 Jul 18, 2024
4347d6c
Merge branch 'master' into documentation/2024-06-Change-document-libl…
takapi327 Jul 18, 2024
1a91a0f
Action sbt scalafmtSbt
takapi327 Jul 18, 2024
ee303c7
Merge branch 'documentation/2024-06-Change-document-liblay-to-laika' …
takapi327 Jul 18, 2024
00ea699
Delete unused
takapi327 Jul 18, 2024
fdeca10
Action sbt scalafmtSbt
takapi327 Jul 18, 2024
5ca0364
Added custom tlSiteHelium internalCSS
takapi327 Jul 18, 2024
409cd15
Create site.css
takapi327 Jul 18, 2024
96df0fd
Action sbt scalafmtSbt
takapi327 Jul 18, 2024
507b94c
Delete unused
takapi327 Jul 18, 2024
720089a
Added css for table td
takapi327 Jul 18, 2024
24e2366
Merge pull request #252 from takapi327/documentation/2024-06-Change-d…
takapi327 Jul 18, 2024
8291e67
Merge branch 'refactor/2024-07-Renewal-of-documentation' into documen…
takapi327 Jul 18, 2024
b300c46
Replace 01-Migration-Notes.md 02-Connection.md document
takapi327 Jul 19, 2024
e71b226
Create 01-Setup.md
takapi327 Jul 19, 2024
41f32e1
temporary evacuation
takapi327 Jul 19, 2024
3f85b3c
Fixed Setup document
takapi327 Jul 19, 2024
e796c15
Fixed 02-Connection document
takapi327 Jul 19, 2024
ba87a66
Fixed directory.conf
takapi327 Jul 19, 2024
8d8739d
Fixed typo
takapi327 Jul 19, 2024
7cc21a0
Remove document index
takapi327 Jul 19, 2024
f06bdc9
Fixed scala program code
takapi327 Jul 20, 2024
9bcc932
Create directory.conf
takapi327 Jul 20, 2024
7825875
Delete unused
takapi327 Jul 20, 2024
79962cc
Fixed Setup document
takapi327 Jul 20, 2024
8e38300
Fixed tutorial index document
takapi327 Jul 20, 2024
cdceed9
Create Simple-Program tutorial document
takapi327 Jul 20, 2024
deb82ae
Create Database-Operations tutorial document
takapi327 Jul 20, 2024
351f18f
Fixed variables
takapi327 Jul 20, 2024
247fa28
Create Parameterized-Queries tutorial document
takapi327 Jul 20, 2024
88fa54d
Create Selecting-Data tutorial document
takapi327 Jul 20, 2024
0df3a44
Create Updating-Data tutorial document
takapi327 Jul 20, 2024
cd77fe2
Create Error-Handling tutorial document
takapi327 Jul 20, 2024
d235578
Create Logging tutorial document
takapi327 Jul 20, 2024
5a0800c
Create Custom-Data-Type tutorial document
takapi327 Jul 20, 2024
b8103bb
Fixed 05-Program
takapi327 Jul 20, 2024
a2e2051
Create Query-Builder tutorial document
takapi327 Jul 20, 2024
4e450ec
Create Schema tutorial document
takapi327 Jul 20, 2024
110ac97
Delete unused
takapi327 Jul 20, 2024
32f1092
Fixed Migration-Notes.md
takapi327 Jul 20, 2024
ec7ec96
Delete text
takapi327 Jul 20, 2024
508e1dd
Update README
takapi327 Jul 20, 2024
1f0874c
Fixed document
takapi327 Aug 10, 2024
da31bed
Replace Connector document old -> reference
takapi327 Aug 10, 2024
5b4c7b1
Delete unused
takapi327 Aug 10, 2024
8986844
Replace Schema-Code-Generation document old -> reference
takapi327 Aug 10, 2024
48409bb
Fixed Connector document
takapi327 Aug 10, 2024
2e52960
Fixed Connector document
takapi327 Aug 10, 2024
5435f94
Merge branch 'master' into refactor/2024-07-Renewal-of-documentation
takapi327 Aug 19, 2024
d74d16d
Update plugin version
takapi327 Aug 19, 2024
e92d54c
Action sbt githubWorkflowGenerate
takapi327 Aug 19, 2024
abd807a
Merge branch 'master' of github.com:takapi327/ldbc into refactor/2024…
takapi327 Aug 23, 2024
f617fe9
Fixed conflict
takapi327 Aug 23, 2024
e67f926
Fixed compile
takapi327 Aug 23, 2024
70331e1
Fixed compile
takapi327 Aug 23, 2024
a7bf6f9
Delete unused
takapi327 Aug 23, 2024
d6b80c3
Merge branch 'master' of github.com:takapi327/ldbc into documentation…
takapi327 Sep 27, 2024
8f7e618
Merge branch 'master' of github.com:takapi327/ldbc into refactor/2024…
takapi327 Sep 27, 2024
140f03a
Merge branch 'refactor/2024-07-Renewal-of-documentation' of github.co…
takapi327 Sep 27, 2024
7332c05
Merge branch 'master' of github.com:takapi327/ldbc into documentation…
takapi327 Sep 28, 2024
54b8f73
Fixed compile
takapi327 Sep 28, 2024
8362c03
Update Migration Notes document
takapi327 Sep 28, 2024
fd64489
Update README AND top index.md
takapi327 Sep 28, 2024
812c8c8
Update CONTRIBUTING document
takapi327 Sep 28, 2024
6a18a9c
Update Migration Notes
takapi327 Sep 28, 2024
7dcf6d3
Update document
takapi327 Sep 28, 2024
b161a60
Update Selecting-Data document
takapi327 Sep 28, 2024
82a4879
Merge branch 'master' into refactor/2024-07-Renewal-of-documentation
takapi327 Sep 29, 2024
d0e388d
Merge branch 'master' into refactor/2024-07-Renewal-of-documentation
takapi327 Oct 1, 2024
0353b8e
Merge branch 'refactor/2024-07-Renewal-of-documentation' of github.co…
takapi327 Oct 5, 2024
5899cce
Update document
takapi327 Oct 5, 2024
505c614
Create index document for English
takapi327 Oct 5, 2024
7658019
Create Setup document for English
takapi327 Oct 5, 2024
28b915a
Create Connection document for English
takapi327 Oct 5, 2024
b3038ac
Create Simple Program document for English
takapi327 Oct 5, 2024
ede8732
Create Database Operation document for English
takapi327 Oct 5, 2024
f618fcd
Create Parameterized Queries document for English
takapi327 Oct 5, 2024
9862aba
Create Selecting Data document for English
takapi327 Oct 5, 2024
2f13e84
Create Updating Data document for English
takapi327 Oct 5, 2024
42eb67c
Create Error Handling document for English
takapi327 Oct 5, 2024
806b96f
Create Logging document for English
takapi327 Oct 5, 2024
a33198d
Create Logging document for English
takapi327 Oct 5, 2024
f9dcdb8
Create Custom Data Type document for English
takapi327 Oct 5, 2024
05d52cf
Create Query Builder document for English
takapi327 Oct 5, 2024
345ac4f
Create Schema document for English
takapi327 Oct 5, 2024
2882aaf
Create Schema Code Generation document for English
takapi327 Oct 5, 2024
d17574b
Create tutorial directory document for English
takapi327 Oct 5, 2024
c859e44
Create Connector document for English
takapi327 Oct 5, 2024
76b6b09
Merge pull request #247 from takapi327/documentation/2024-06-Fixed-do…
takapi327 Oct 6, 2024
3e8fbf0
Create LaikaSettings
takapi327 Oct 6, 2024
f3bdd68
Update LaikaSettings
takapi327 Oct 6, 2024
231be14
Update LaikaSettings
takapi327 Oct 6, 2024
18e4cdc
Update docs project
takapi327 Oct 6, 2024
6122a9d
Change laika.versioned true
takapi327 Oct 6, 2024
4060e63
Action sbt scalafmtSbt
takapi327 Oct 6, 2024
2b129c6
Delete unused import
takapi327 Oct 6, 2024
4202116
Update olderVersions document
takapi327 Oct 7, 2024
a5d4cb9
Added navLinks settings
takapi327 Oct 7, 2024
b972f16
Action sbt scalafmtSbt
takapi327 Oct 7, 2024
a2ccdda
Create LdbcVersions
takapi327 Oct 8, 2024
539b111
Use LdbcVersions
takapi327 Oct 8, 2024
bce80a7
Action sbt scalafmtSbt
takapi327 Oct 8, 2024
c214d66
Merge pull request #308 from takapi327/feature/2024-09-Support-Versio…
takapi327 Oct 9, 2024
930b45c
Merge branch 'master' of github.com:takapi327/ldbc into refactor/2024…
takapi327 Oct 12, 2024
780cbb8
Merge branch 'refactor/2024-07-Renewal-of-documentation' of github.co…
takapi327 Oct 12, 2024
70fbfda
Merge branch 'master' into refactor/2024-07-Renewal-of-documentation
takapi327 Oct 13, 2024
65219a9
Action sbt githubWorkflowGenerate
takapi327 Oct 15, 2024
026d01f
Update template
takapi327 Oct 17, 2024
5555fa1
Change version 0.3 -> 0.2
takapi327 Oct 19, 2024
e34a3da
Delete unused
takapi327 Oct 19, 2024
2b01077
Delete unused
takapi327 Oct 19, 2024
15b8bbe
Update index.md
takapi327 Oct 19, 2024
d034615
Delete unused
takapi327 Oct 19, 2024
ab408a3
Migrate ja document
takapi327 Oct 19, 2024
8992728
Delete unused
takapi327 Oct 19, 2024
01a06bf
Migrate en document
takapi327 Oct 19, 2024
9c1d06b
Replace Older Versions document
takapi327 Oct 19, 2024
7c34bbc
Change MYSQL_VERSION variables
takapi327 Oct 19, 2024
080c1ed
Create README document
takapi327 Oct 19, 2024
7ae262d
Setting tlSiteKeepFiles false
takapi327 Oct 19, 2024
e4589c8
Action sbt githubWorkflowGenerate
takapi327 Oct 19, 2024
e951966
Added comment
takapi327 Oct 19, 2024
25f9ae4
FIxed link
takapi327 Oct 19, 2024
607fa60
Merge pull request #316 from takapi327/document/2024-10-Migrate-v0.2-…
takapi327 Oct 22, 2024
34a2965
Update README
takapi327 Oct 22, 2024
b94994b
Update LaikaSettings
takapi327 Oct 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,59 @@ jobs:

- run: scala-steward validate-repo-config .scala-steward.conf

site:
name: Generate Site
strategy:
matrix:
os: [ubuntu-latest]
java: [corretto@11]
runs-on: ${{ matrix.os }}
steps:
- name: Install sbt
uses: sbt/setup-sbt@v1

- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Java (corretto@11)
id: setup-java-corretto-11
if: matrix.java == 'corretto@11'
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 11
cache: sbt

- name: sbt update
if: matrix.java == 'corretto@11' && steps.setup-java-corretto-11.outputs.cache-hit == 'false'
run: sbt +update

- name: Setup Java (corretto@17)
id: setup-java-corretto-17
if: matrix.java == 'corretto@17'
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 17
cache: sbt

- name: sbt update
if: matrix.java == 'corretto@17' && steps.setup-java-corretto-17.outputs.cache-hit == 'false'
run: sbt +update

- name: Generate site
run: sbt docs/tlSite

- name: Publish site
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v')
uses: peaceiris/actions-gh-pages@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/target/docs/site
keep_files: false

sbtScripted:
name: sbt scripted
strategy:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ metals.sbt

**/benchmark/**/*.json
**/benchmark/**/*.svg

# for Scala CLI
**/.scala-build/
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ These guidelines are meant to be a living document that should be changed and ad

## Tooling

LDBC is built with [sbt](https://github.com/sbt/sbt), and you should be able to jump right in by running `sbt test`.
ldbc is built with [sbt](https://github.com/sbt/sbt), and you should be able to jump right in by running `sbt test`.

Please make sure to run `sbt scalafmtAll` (and commit the results!) before opening a pull request. This will take care of running both scalafmt, ensuring that the build doesn't just immediately fail to compile your work.

Expand Down
31 changes: 17 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@

ldbc (Lepus Database Connectivity) is Pure functional JDBC layer with Cats Effect 3 and Scala 3.

ldbc is Created under the influence of [tapir](https://github.com/softwaremill/tapir), a declarative, type-safe web endpoint library. Using tapir, you can build type-safe endpoints and also generate OpenAPI documentation from the endpoints you build.
ldbc is a [Typelevel](http://typelevel.org/) project. This means we embrace pure, typeful, functional programming, and provide a safe and friendly environment for teaching, learning, and contributing as described in the Scala [Code of Conduct](http://scala-lang.org/conduct.html).

ldbc allows the same type-safe construction with Scala at the database layer and document generation using the constructed one.
Note that **ldbc** is pre-1.0 software and is still undergoing active development. New versions are **not** binary compatible with prior versions, although in most cases user code will be source compatible.

> [!NOTE]
> **ldbc** is pre-1.0 software and is still undergoing active development. New versions are **not** binary compatible with prior versions, although in most cases user code will be source compatible.

Please drop a :star: if this project interests you. I need encouragement.

> [!CAUTION]
> The current README contains the contents of the `0.3.x` version under development. Please refer to the [documentation](https://takapi327.github.io/ldbc/0.2) for the `0.2.x` version, which is currently released as a stable version.

## Modules availability

ldbc is available on the JVM, Scala.js, and ScalaNative
Expand All @@ -50,33 +53,33 @@ For people that want to skip the explanations and see it action, this is the pla
### Dependency Configuration

```scala
libraryDependencies += "io.github.takapi327" %% "ldbc-dsl" % "${version}"
libraryDependencies += "io.github.takapi327" %% "ldbc-dsl" % "latest"
```

For Cross-Platform projects (JVM, JS, and/or Native):

```scala
libraryDependencies += "io.github.takapi327" %%% "ldbc-dsl" % "${version}"
libraryDependencies += "io.github.takapi327" %%% "ldbc-dsl" % "latest"
```

The dependency package used depends on whether the database connection is made via a connector using the Java API or a connector provided by ldbc.

**Use jdbc connector**

```scala
libraryDependencies += "io.github.takapi327" %% "jdbc-connector" % "${version}"
libraryDependencies += "io.github.takapi327" %% "jdbc-connector" % "latest"
```

**Use ldbc connector**

```scala
libraryDependencies += "io.github.takapi327" %% "ldbc-connector" % "${version}"
libraryDependencies += "io.github.takapi327" %% "ldbc-connector" % "latest"
```

For Cross-Platform projects (JVM, JS, and/or Native)

```scala
libraryDependencies += "io.github.takapi327" %%% "ldbc-connector" % "${version}"
libraryDependencies += "io.github.takapi327" %%% "ldbc-connector" % "latest"
```

### Usage
Expand Down Expand Up @@ -118,7 +121,7 @@ val connection: Resource[IO, Connection[IO]] =

The connection process to the database can be carried out using the connections established by each of these methods.

```scala
```scala 3
val result: IO[(List[Int], Option[Int], Int)] = connection.use { conn =>
(for
result1 <- sql"SELECT 1".query[Int].to[List]
Expand All @@ -135,13 +138,13 @@ ldbc provides not only plain queries but also type-safe database connections usi
The first step is to set up dependencies.

```scala
libraryDependencies += "io.github.takapi327" %% "ldbc-query-builder" % "${version}"
libraryDependencies += "io.github.takapi327" %% "ldbc-query-builder" % "latest"
```

For Cross-Platform projects (JVM, JS, and/or Native):

```scala
libraryDependencies += "io.github.takapi327" %%% "ldbc-query-builder" % "${version}"
libraryDependencies += "io.github.takapi327" %%% "ldbc-query-builder" % "latest"
```

ldbc uses classes to construct queries.
Expand Down Expand Up @@ -180,13 +183,13 @@ ldbc also allows type-safe construction of schema information for tables.
The first step is to set up dependencies.

```scala
libraryDependencies += "io.github.takapi327" %% "ldbc-schema" % "${version}"
libraryDependencies += "io.github.takapi327" %% "ldbc-schema" % "latest"
```

For Cross-Platform projects (JVM, JS, and/or Native):

```scala
libraryDependencies += "io.github.takapi327" %%% "ldbc-schema" % "${version}"
libraryDependencies += "io.github.takapi327" %%% "ldbc-schema" % "latest"
```

The next step is to create a schema for use by the query builder.
Expand Down Expand Up @@ -222,8 +225,8 @@ val result: IO[List[User]] = connection.use { conn =>

Full documentation can be found at Currently available in English and Japanese.

- [English](https://takapi327.github.io/ldbc/en/index.html)
- [Japanese](https://takapi327.github.io/ldbc/ja/index.html)
- [English](https://takapi327.github.io/ldbc/0.2/en/)
- [Japanese](https://takapi327.github.io/ldbc/0.2/ja/)

## Features/Roadmap

Expand Down
38 changes: 14 additions & 24 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Workflows.*
import ProjectKeys.*
import Implicits.*

ThisBuild / tlBaseVersion := "0.3"
ThisBuild / tlBaseVersion := LdbcVersions.latest
ThisBuild / tlFatalWarnings := true
ThisBuild / projectName := "ldbc"
ThisBuild / scalaVersion := scala3
Expand All @@ -24,6 +24,8 @@ ThisBuild / githubWorkflowAddedJobs ++= Seq(sbtScripted.value)
ThisBuild / githubWorkflowBuildPostamble += dockerStop
ThisBuild / githubWorkflowTargetBranches := Seq("**")
ThisBuild / githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Tag("v")))
ThisBuild / tlSitePublishBranch := None
ThisBuild / tlSiteKeepFiles := false // TODO: Deleted when publishing documentation for 0.3

ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org"
sonatypeRepository := "https://s01.oss.sonatype.org/service/local"
Expand Down Expand Up @@ -216,34 +218,22 @@ lazy val benchmark = (project in file("benchmark"))

lazy val docs = (project in file("docs"))
.settings(
description := "Documentation for ldbc",
scalacOptions := Nil,
mdocIn := baseDirectory.value / "src" / "main" / "mdoc",
paradoxTheme := Some(builtinParadoxTheme("generic")),
paradoxProperties ++= Map(
"org" -> organization.value,
"scalaVersion" -> scalaVersion.value,
"version" -> version.value.takeWhile(_ != '+'),
"mysqlVersion" -> mysqlVersion
description := "Documentation for ldbc",
mdocIn := (Compile / sourceDirectory).value / "mdoc",
tlSiteIsTypelevelProject := Some(TypelevelProject.Affiliate),
mdocVariables ++= Map(
"ORGANIZATION" -> organization.value,
"SCALA_VERSION" -> scalaVersion.value,
"MYSQL_VERSION" -> mysqlVersion
),
Compile / paradox / sourceDirectory := mdocOut.value,
Compile / paradoxRoots := List("index.html", "en/index.html", "ja/index.html"),
makeSite := makeSite.dependsOn(mdoc.toTask("")).value,
git.remoteRepo := "git@github.com:takapi327/ldbc.git",
ghpagesNoJekyll := true
laikaTheme := LaikaSettings.helium.value
)
.settings(commonSettings)
.dependsOn(
core.jvm,
sql.jvm,
dsl.jvm,
queryBuilder.jvm,
schema.jvm,
schemaSpy,
codegen.jvm,
hikari
connector.jvm,
schema.jvm
)
.enablePlugins(MdocPlugin, SitePreviewPlugin, ParadoxSitePlugin, GhpagesPlugin, NoPublishPlugin)
.enablePlugins(AutomateHeaderPlugin, TypelevelSitePlugin, NoPublishPlugin)

lazy val ldbc = tlCrossRootProject
.settings(description := "Pure functional JDBC layer with Cats Effect 3 and Scala 3")
Expand Down
47 changes: 47 additions & 0 deletions docs/src/main/mdoc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{%
laika.title = ldbc
laika.versioned = false
laika.metadata {
language = en
isRootPath = true
}
%}

# ldbc (Lepus Database Connectivity)

@:image(img/lepus_logo.png) {
alt = "ldbc (Lepus Database Connectivity)"
style = "center-logo"
}

[![Maven Central Version](https://img.shields.io/maven-central/v/io.github.takapi327/ldbc-core_3?color=blue)](https://search.maven.org/artifact/io.github.takapi327/ldbc-core_3/0.2.1/jar)
[![MIT License](https://img.shields.io/badge/license-MIT-green)](https://en.wikipedia.org/wiki/MIT_License)
[![Scala Version](https://img.shields.io/badge/scala-v3.3.x-red)](https://github.com/lampepfl/dotty)
[![Typelevel Affiliate Project](https://img.shields.io/badge/typelevel-affiliate%20project-FF6169.svg)](https://typelevel.org/projects/affiliate/)

ldbc (Lepus Database Connectivity) is Pure functional JDBC layer with Cats Effect 3 and Scala 3.

ldbc is Created under the influence of [tapir](https://github.com/softwaremill/tapir), a declarative, type-safe web endpoint library. Using tapir, you can build type-safe endpoints and also generate OpenAPI documentation from the endpoints you build.

ldbc allows the same type-safe construction with Scala at the database layer and document generation using the constructed one.

Note that **ldbc** is pre-1.0 software and is still undergoing active development. New versions are **not** binary compatible with prior versions, although in most cases user code will be source compatible.

## Documentation

Full documentation can be found at Currently available in English and Japanese.

- [English](en/index.md)
- [Japanese](ja/index.md)

## Contributing

All suggestions welcome :)!

If you’d like to contribute, see the list of [issues](https://github.com/takapi327/ldbc/issues) and pick one! Or report your own. If you have an idea you’d like to discuss, that’s always a good option.

If you have any questions about why or how it works, feel free to ask on github. This probably means that the documentation, scaladocs, and code are unclear and can be improved for the benefit of all.

### Testing locally

If you want to build and run the tests for yourself, you'll need a local MySQL database. The easiest way to do this is to run `docker-compose up` from the project root.
7 changes: 7 additions & 0 deletions docs/src/main/mdoc/css/site.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.center-logo {
text-align: center;
}

table td:not(:has(code)) {
text-align: center;
}
50 changes: 50 additions & 0 deletions docs/src/main/mdoc/default.template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="${?laika.metadata.language}">

@:include(helium.site.templates.head)

<body>

@:include(helium.site.templates.topNav)

<nav id="sidebar">

<div class="row">
@:for(helium.site.topNavigation.phoneLinks)
${_}
@:@
</div>

@:if(laika.metadata.isRootPath)
@:navigationTree {
entries = ${helium.site.mainNavigation.prependLinks} [
{ target = "/", excludeRoot = true, depth = 1 }
] ${helium.site.mainNavigation.appendLinks}
}
@:else
@:navigationTree {
entries = ${helium.site.mainNavigation.prependLinks} [
{ target = /${laika.metadata.language}/, excludeRoot = true, excludeSections = ${helium.site.mainNavigation.excludeSections}, depth = ${helium.site.mainNavigation.depth} },
] ${helium.site.mainNavigation.appendLinks}
}
@:@

</nav>

<div id="container">

@:include(helium.site.templates.pageNav)

<main class="content">

${cursor.currentDocument.content}

@:include(helium.site.templates.footer)

</main>

</div>

</body>

</html>
5 changes: 5 additions & 0 deletions docs/src/main/mdoc/directory.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
laika.navigationOrder = [
index.md
older-versions.md
]
laika.versioned = true
Loading