File tree Expand file tree Collapse file tree 5 files changed +17
-4
lines changed
core/src/commonMain/kotlin/com/powersync/db/schema
plugins/build-plugin/src/main/kotlin Expand file tree Collapse file tree 5 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,7 @@ permissions:
1111
1212jobs :
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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -2,15 +2,30 @@ package com.powersync.db.schema
22
33import 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+ */
511public 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 ->
Original file line number Diff line number Diff 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
66dokka {
77 pluginsConfiguration.html {
88 val docsAssetsDir = rootProject.file(" docs/assets" )
You can’t perform that action at this time.
0 commit comments