File tree 5 files changed +17
-4
lines changed
core/src/commonMain/kotlin/com/powersync/db/schema
plugins/build-plugin/src/main/kotlin
5 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,7 @@ permissions:
11
11
12
12
jobs :
13
13
build :
14
- # Need to be able to build targets
15
- runs-on : macos-latest
14
+ runs-on : ubuntu-latest
16
15
steps :
17
16
- uses : actions/checkout@v4
18
17
- name : Validate Gradle Wrapper
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ plugins {
8
8
alias(libs.plugins.androidLibrary)
9
9
alias(libs.plugins.kotlinter)
10
10
id(" com.powersync.plugins.sonatype" )
11
- id(" org.jetbrains.dokka" ) version " 2.0.0"
12
11
id(" dokka-convention" )
13
12
}
14
13
Original file line number Diff line number Diff line change @@ -2,15 +2,30 @@ package com.powersync.db.schema
2
2
3
3
import kotlinx.serialization.Serializable
4
4
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
+ */
5
11
public data class Schema (
6
12
val tables : List <Table >,
7
13
) {
8
14
init {
9
15
validate()
10
16
}
11
17
18
+ /* *
19
+ * Secondary constructor to create a schema with a variable number of tables.
20
+ */
12
21
public constructor (vararg tables: Table ) : this (tables.asList())
13
22
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
+ */
14
29
public fun validate () {
15
30
val tableNames = mutableSetOf<String >()
16
31
tables.forEach { table ->
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ plugins {
2
2
id(" org.jetbrains.dokka" )
3
3
}
4
4
5
- // Shared Dokka config
5
+ // Shared Dokka config for additional assets
6
6
dokka {
7
7
pluginsConfiguration.html {
8
8
val docsAssetsDir = rootProject.file(" docs/assets" )
You can’t perform that action at this time.
0 commit comments