Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: scylladb database provider implementation #320

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

DanielHe4rt
Copy link

@DanielHe4rt DanielHe4rt commented Nov 4, 2024

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

Feature

This pull request introduces support for ScyllaDB as a new database option in the project. It includes modifications to various parts of the codebase to integrate ScyllaDB, including database drivers, templates, and Docker configurations.

Description of Changes:

  • Added ScyllaDB GoCQL Fork to the project
  • Added ScyllaDB Docker to the Test Container
  • Added Dockerfile for the ScyllaDB Environment
  • Added Environment Files to the ScyllaDB Implementation
  • Added go mod edit helper to get the updated driver

Checklist

@DanielHe4rt DanielHe4rt marked this pull request as ready for review November 5, 2024 00:01
@@ -103,6 +103,7 @@ var (
sqliteDriver = []string{"github.com/mattn/go-sqlite3"}
redisDriver = []string{"github.com/redis/go-redis/v9"}
mongoDriver = []string{"go.mongodb.org/mongo-driver"}
scyllaDriver = []string{"github.com/gocql/gocql"}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
scyllaDriver = []string{"github.com/gocql/gocql"}
scyllaDriver = []string{"github.com/scylladb/gocql"}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we have to replace the module, I managed to add a GoCQL driver and then a a replaceable right after it.

Should be clean enough for now.

cmd/program/program.go Outdated Show resolved Hide resolved
cmd/steps/steps.go Outdated Show resolved Hide resolved
"strings"
"time"

"github.com/gocql/gocql"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do believe it should also be https://github.com/scylladb/gocql

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, our gocql driver is not there yet.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK we have to replace one module for another.

Check Gemini go.mod for a reference.

"strings"
"time"

"github.com/gocql/gocql"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, our gocql driver is not there yet.

cmd/template/dbdriver/files/tests/scylla.tmpl Outdated Show resolved Hide resolved
cmd/template/docker/files/docker-compose/scylla.tmpl Outdated Show resolved Hide resolved
cmd/template/docker/files/docker-compose/scylla.tmpl Outdated Show resolved Hide resolved
docs/docs/endpoints-test/scylladb.md Outdated Show resolved Hide resolved
cmd/template/docker/files/docker-compose/scylla.tmpl Outdated Show resolved Hide resolved
cmd/template/dbdriver/files/service/scylla.tmpl Outdated Show resolved Hide resolved
@DanielHe4rt
Copy link
Author

Ready to review @Melkeydev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants