Skip to content

πŸ“š A merge between NoSql and Sql that supports ERM. meme

Notifications You must be signed in to change notification settings

HeathLoganCampbell/ValkrinSql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ValkrinSql

Example

We will save a class with a few random details to the database

import lombok.ToString;

@ToString
public class ExampleBase
{
    public long yeet = -1;
    public boolean day = false;
    public String message= "Hello world";
}
import dev.sprock.valkrin.Valkrin;
import dev.sprock.valkrin.tracker.ValkrinTracker;

public class Exmaple
{
    public static void main(String[] args)
    {
        Valkrin valkrin = new Valkrin("localhost", "3306", "valkrin", "root", "");

        ValkrinTracker<ExampleBase> exmapleTracker = new ValkrinTracker<>(ExampleBase.class, "Examples", valkrin);

        ExampleBase thingToSave = new ExampleBase();

        //Save the data to the database
        exmapleTracker.save("Username", thingToSave);

        //load the data from the database
        ExampleBase thingFromLoad = exmapleTracker.load("Username");

        System.out.println(thingFromLoad);

    }
}

About

πŸ“š A merge between NoSql and Sql that supports ERM. meme

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages