Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PgFormatter ¶
func PgFormatter(buf *sqlparser.TrackedBuffer, node sqlparser.SQLNode)
Types ¶
type PgSpecialFeatures ¶
type PgSpecialFeatures struct {
my2any.SpecialFeatures
}
func (PgSpecialFeatures) Rewrite ¶
func (p PgSpecialFeatures) Rewrite(db my2any.GenericDB, ast sqlparser.Statement, pvp *int) (string, bool)
SELECT
a.attname::text AS "InsertID" FROM pg_catalog.pg_attribute a
WHERE a.attrelid = (
SELECT cls.oid FROM pg_catalog.pg_class cls JOIN pg_catalog.pg_namespace nsp ON cls.relnamespace=nsp.oid WHERE relname = 'aitest' AND nspname = 'public'
) AND a.attnum > 0 AND 'a' IN (SELECT 'a'::char FROM pg_catalog.pg_attrdef b WHERE (a.attrelid = b.adrelid AND a.attnum = b.adnum ) AND adsrc LIKE 'nextval%') AND 'p' IN (SELECT contype FROM pg_catalog.pg_constraint b WHERE (a.attrelid = b.conrelid AND array[a.attnum] <@ b.conkey ))
type PgSyntaxer ¶
func (PgSyntaxer) Preprocess ¶
func (PgSyntaxer) Preprocess(ast sqlparser.Statement, schema string)
type PqConverter ¶
func (PqConverter) Convert ¶
func (p PqConverter) Convert(nct *sql.ColumnType) (col *sqlv.Column, scan interface{})
Click to show internal directories.
Click to hide internal directories.