-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
40 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 11 additions & 8 deletions
19
...er-mongodb/src/main/kotlin/com/kotlindiscord/kord/extensions/adapters/mongodb/Registry.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
package com.kotlindiscord.kord.extensions.adapters.mongodb | ||
|
||
import com.kotlindiscord.kord.extensions.adapters.mongodb.codecs.* | ||
import com.kotlindiscord.kord.extensions.adapters.mongodb.db.Metadata | ||
import com.kotlindiscord.kord.extensions.storage.StorageType | ||
import dev.kord.common.entity.Snowflake | ||
import kotlinx.datetime.DateTimePeriod | ||
import kotlinx.datetime.Instant | ||
import org.bson.codecs.configuration.CodecRegistries | ||
import org.bson.codecs.configuration.CodecRegistry | ||
import org.bson.codecs.kotlinx.KotlinSerializerCodec | ||
|
||
public val kordExCodecRegistry: CodecRegistry = CodecRegistries.fromCodecs( | ||
DateTimePeriodCodec, | ||
InstantCodec, | ||
SnowflakeCodec, | ||
StorageTypeCodec, | ||
Metadata.codec, | ||
|
||
// Required b/c the BSON codec library doesn't support standard polymorphism. | ||
ConfigStorageTypeCodec, | ||
DataStorageTypeCodec, | ||
KotlinSerializerCodec.create<DateTimePeriod>(), | ||
KotlinSerializerCodec.create<Instant>(), | ||
KotlinSerializerCodec.create<Snowflake>(), | ||
KotlinSerializerCodec.create<StorageType>(), | ||
) |
26 changes: 0 additions & 26 deletions
26
...n/kotlin/com/kotlindiscord/kord/extensions/adapters/mongodb/codecs/DateTimePeriodCodec.kt
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
...src/main/kotlin/com/kotlindiscord/kord/extensions/adapters/mongodb/codecs/InstantCodec.kt
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
...c/main/kotlin/com/kotlindiscord/kord/extensions/adapters/mongodb/codecs/SnowflakeCodec.kt
This file was deleted.
Oops, something went wrong.
57 changes: 0 additions & 57 deletions
57
...main/kotlin/com/kotlindiscord/kord/extensions/adapters/mongodb/codecs/StorageTypeCodec.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters