πŸš€ DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more β†’
Socket
Book a DemoInstallSign in
Socket

com.hxuanyu.doltmanager:jdolt-core

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.hxuanyu.doltmanager:jdolt-core

JDolt is a lightweight Java client library for Dolt, enabling interaction with Dolt databases. It is suitable for data version management, data synchronization, and related scenarios.

Source
mavenMaven
Version
1.0.2
Version published
Maintainers
1
Source

JDolt

JDolt is a Java client library for Dolt, a SQL database with Git-like version control capabilities. This project provides a high-level API for interacting with Dolt databases, allowing you to perform version control operations on your database similar to Git operations on code.

Maven Central Build Status License GitHub stars

Project Overview

JDolt encapsulates Dolt's version control functionality into a Java API, making it easy to integrate database version control into your Java applications. It provides methods for common version control operations like commit, branch, merge, pull, push, and more.

Modules

The project consists of two main modules:

  • jdolt-core: Contains the core functionality for interacting with Dolt databases, including:

    • API interfaces and implementations
    • Version control operations
    • Database connection management
  • jdolt-service: A Spring Boot application that provides a service layer on top of jdolt-core.

Features

JDolt supports a wide range of Dolt version control operations, including:

  • Branch management (create, list, delete)
  • Commit changes
  • Checkout branches or commits
  • Merge branches
  • Pull and push changes
  • Reset and revert changes
  • Conflict resolution
  • Diff and status operations
  • And many more

Getting Started

Prerequisites

  • Java 17 or higher
  • Maven
  • Access to a Dolt database

Installation

  • Clone the repository:

    git clone https://github.com/yourusername/JDolt.git
    
  • Build the project with Maven:

    cd JDolt
    mvn clean install
    

Configuration

Configure your Dolt database connection in your application. If using the jdolt-service module, you can configure it in the application.yaml file:

spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    username: your_username
    password: your_password
    url: jdbc:mysql://your_dolt_server:port/your_database

Usage Example

Here's a simple example of how to use JDolt in your Java application:

// Initialize the DoltClient with a DataSource
DataSource dataSource = // your DataSource implementation
DoltClient doltClient = DoltClient.initialize(dataSource);

// Get the version control API
VersionControl versionControl = doltClient.versionControl();

// Create a new branch
versionControl.doltBranch().prepare()
    .createBranch("new-feature")
    .execute();

// Checkout the new branch
versionControl.doltCheckout().prepare()
    .branch("new-feature")
    .execute();

// After making changes to your database, commit them
versionControl.doltCommit().prepare()
    .message("Added new feature")
    .execute();

Project Structure

JDolt/
β”œβ”€β”€ doc/
β”‚   └── codeTemplates/       # Code templates for creating Dolt components
β”œβ”€β”€ jdolt-core/              # Core library module
β”‚   └── src/
β”‚       β”œβ”€β”€ main/
β”‚       β”‚   └── java/
β”‚       β”‚       └── com/
β”‚       β”‚           └── hxuanyu/
β”‚       β”‚               └── jdolt/
β”‚       β”‚                   β”œβ”€β”€ core/       # Core functionality
β”‚       β”‚                   β”œβ”€β”€ manager/    # Connection management
β”‚       β”‚                   └── util/       # Utility classes
β”‚       └── test/           # Unit tests
β”œβ”€β”€ jdolt-service/          # Spring Boot service module
β”‚   └── src/
β”‚       β”œβ”€β”€ main/
β”‚       β”‚   β”œβ”€β”€ java/
β”‚       β”‚   β”‚   └── com/
β”‚       β”‚   β”‚       └── hxuanyu/
β”‚       β”‚   β”‚           └── jdolt/
β”‚       β”‚   β”‚               └── DoltManagerApplication.java
β”‚       β”‚   └── resources/
β”‚       β”‚       └── application.yaml
β”‚       └── test/           # Unit tests
└── pom.xml                 # Maven parent POM

Dependency

You can add JDolt to your project directly from Maven Central:

<dependency>
    <groupId>com.hxuanyu.doltmanager</groupId>
    <artifactId>jdolt-core</artifactId>
    <version>1.0.1</version>
</dependency>

Contribution

Contributions are welcome! Please open issues or pull requests on GitHub.

License

JDolt is licensed under the Apache License 2.0. See the LICENSE file for details.

Acknowledgments

  • Dolt - The SQL database with Git-like version control
  • The developers and contributors to this project

For more information, usage examples, and advanced features, please refer to the Wiki or the δΈ­ζ–‡ζ–‡ζ‘£.

FAQs

Package last updated on 14 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts