Skip to content

Nopock/Store

Repository files navigation

Welcome to Store 👋

Version Documentation Maintenance License: MIT Release Java CI

An AIO data storage library.

Prerequisites

  • Java 8

Installation

    repositories {
        maven("https://jitpack.io")
    }
    
    dependencies {
        implementation("com.github.Nopock:Store:[Latest Commit]")

        // If you are using any redis repositories
        implementation("redis.clients:jedis:4.3.1")

        // If you are using any mongo repositories
        implementation("org.mongodb:mongo-java-driver:3.12.11")

        // If you are using reactive repositories
        implementation("io.projectreactor:reactor-core:3.5.1")
    }
    
    // You will need to include MongoDB / redis yourself as I do not want to fatten the jar

Build Yourself

./gradlew build
./gradlew publishToMavenLocal

Usage

// This Database Connection system is currently Deprecated...
// for updated examples check out https://nopox.gitbook.io/libraries/products/store
DataTypeResources.enableMongoRepositories("localhost", 27017, "Database")

val controller = DataStoreController.of<ExampleData>(StorageType.MONGO)

controller.repository.save(ExampleData(UUID.randomUUID().toString(), "Hello World!", 10))
    data class ExampleData(override val identifier: String, val name: String, val age: Int) : Storable

Roadmap

  • Wrapper for return types
  • Code cleanups
  • More CI/CD
  • Add support to access the raw resources

Alt

Author

👤 Nathan

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2022 Nathan.
This project is MIT licensed.