sqlfiddle

package module
v0.0.0-...-62ce714 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2018 License: MIT Imports: 5 Imported by: 0

README

SQL Fiddle API (UnOfficial)

Purpose

This Go library is aimed to provide an API to operate http://sqlfiddle.com/

Usage

fiddle := NewFiddle("")
res, err := fiddle.CreateSchema(Mysql5_6, `create table person(id int not null auto_increment,
    name varchar(8),
    birthday datetime,
    constraint pk__person primary key(id));`)

ret, err := fiddle.RunSQL(Mysql5_6, res.Code, "select * from person;")

Documentation

Index

Constants

View Source
const (
	Mysql5_6      = 9
	Oracle11gR2   = 4
	PostgreSQL96  = 17
	PostgreSQL93  = 15
	SQLite_WebSQL = 7
	SQLite_SQLjs  = 5
	MSSQL2017     = 18
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Fiddle

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

func NewFiddle

func NewFiddle(baseURL string) *Fiddle

func (*Fiddle) CreateSchema

func (f *Fiddle) CreateSchema(dbType int, sql string) (*response, error)

func (*Fiddle) RunSQL

func (f *Fiddle) RunSQL(dbType int, code, sql string) (*sqlResponse, error)

Jump to

Keyboard shortcuts

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