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.

        Source Files