Skip to content

Commit a3696bd

Browse files
add schema comment
1 parent 6f5d36b commit a3696bd

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

.github/workflows/docs-deploy.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ permissions:
1111

1212
jobs:
1313
build:
14-
# Need to be able to build targets
15-
runs-on: macos-latest
14+
runs-on: ubuntu-latest
1615
steps:
1716
- uses: actions/checkout@v4
1817
- name: Validate Gradle Wrapper

connectors/supabase/build.gradle.kts

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ plugins {
88
alias(libs.plugins.androidLibrary)
99
alias(libs.plugins.kotlinter)
1010
id("com.powersync.plugins.sonatype")
11-
id("org.jetbrains.dokka") version "2.0.0"
1211
id("dokka-convention")
1312
}
1413

core/src/commonMain/kotlin/com/powersync/db/schema/Schema.kt

+15
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,30 @@ package com.powersync.db.schema
22

33
import kotlinx.serialization.Serializable
44

5+
/**
6+
* The schema used by the database.
7+
*
8+
* The implementation uses the schema as a "VIEW" on top of JSON data.
9+
* No migrations are required on the client.
10+
*/
511
public data class Schema(
612
val tables: List<Table>,
713
) {
814
init {
915
validate()
1016
}
1117

18+
/**
19+
* Secondary constructor to create a schema with a variable number of tables.
20+
*/
1221
public constructor(vararg tables: Table) : this(tables.asList())
1322

23+
/**
24+
* Validates the schema by ensuring there are no duplicate table names
25+
* and that each table is valid.
26+
*
27+
* @throws AssertionError if duplicate table names are found.
28+
*/
1429
public fun validate() {
1530
val tableNames = mutableSetOf<String>()
1631
tables.forEach { table ->

docs/assets/base.css

Whitespace-only changes.

plugins/build-plugin/src/main/kotlin/dokka-convention.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id("org.jetbrains.dokka")
33
}
44

5-
// Shared Dokka config
5+
// Shared Dokka config for additional assets
66
dokka {
77
pluginsConfiguration.html {
88
val docsAssetsDir = rootProject.file("docs/assets")

0 commit comments

Comments
 (0)