translate

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package translate implements translation of driver specific SQL queries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTranslatingExecutor

func NewTranslatingExecutor(exec gorp.SqlExecutor, translate func(string) string) gorp.SqlExecutor

NewTranslatingExecutor returns an executor wrapping the existing executor. All query strings passed to the executor will be run through the translate function before begin passed to the driver.

func PostgresToSQLite

func PostgresToSQLite(query string) string

PostgresToSQLite translates github.com/lib/pq flavored SQL quries to github.com/mattn/go-sqlite3's flavor.

It assumes that possitional bind arguements ($1, $2, etc.) are unqiue and in sequential order.

Types

This section is empty.

Jump to

Keyboard shortcuts

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