sqrl

package module
v0.0.0-...-09680da Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2022 License: MIT Imports: 2 Imported by: 0

README

sqrl

scan build GitHub issues Version

Report a Bug | Request a Feature | Ask a Question


SQRL uses SQLite to deliver a NoSQL-like experience ORM while keeping the database light.

go get -u github.com/arivictor/sqrl

GitHub code size in bytes

⚡️ Quick Start

package main

import (
	"github.com/arivictor/sqrl"
)

func main() {
	c := sqrl.NewClient()
}

Go Report Card

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides access to the sqrl service

func NewClient

func NewClient(database string) (*Client, error)

NewClient creates a new client service

type Database

type Database struct {
	*sql.DB
}

Database provides access to the database service

func NewDatabase

func NewDatabase(path string) (*Database, error)

NewDatabase creates a new database connection

func (*Database) AutoMigrate

func (d *Database) AutoMigrate(models ...interface{})

AutoMigrate migrates models to the database

type Migrator

type Migrator struct {
}

Migrator provides access to the database migrator service

func (*Migrator) AutoMigrate

func (m *Migrator) AutoMigrate(models ...interface{})

AutoMigrate migrates models to the database

func (*Migrator) Migrate

func (m *Migrator) Migrate(model interface{})

Migrate migrates a model to the database

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

Repository provides access to the repo service

func NewRepository

func NewRepository(db *Database) *Repository

NewRepository returns a new Repository

func (*Repository) Insert

func (r *Repository) Insert()

Insert inserts a record into a database

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL