Documentation ¶
Index ¶
- func CanReadFromStandardInput() bool
- func Dump(ctx context.Context, db *genji.DB, w io.Writer, tables ...string) error
- func DumpSchema(ctx context.Context, db *genji.DB, w io.Writer, tables ...string) error
- func ExecSQL(ctx context.Context, db *genji.DB, r io.Reader, w io.Writer) error
- func InsertJSON(db *genji.DB, table string, r io.Reader) error
- func OpenDB(ctx context.Context, dbPath, engineName string) (*genji.DB, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanReadFromStandardInput ¶
func CanReadFromStandardInput() bool
CanReadFromStandardInput returns whether there is data to be read in stdin.
func Dump ¶
Dump takes a database and dumps its content as SQL queries in the given writer. If tables is provided, only selected tables will be outputted.
func DumpSchema ¶
DumpSchema takes a database and dumps its schema as SQL queries in the given writer. If tables are provided, only selected tables will be outputted.
func ExecSQL ¶
ExecSQL reads SQL queries from reader and executes them until the reader is exhausted. If the query has results, they will be outputted to w.
func InsertJSON ¶
InsertJSON reads json documents from r and inserts them into the selected table. The reader can be either a stream of json objects or an array of objects.
Types ¶
This section is empty.