src/nopg.js
function pg_get_indexdef(self, name) {
	return do_query(self, 'SELECT indexdef FROM pg_indexes WHERE indexname = $1 LIMIT 1', [name]).then(function(rows) {
		if(!rows) { throw new TypeError("Unexpected result from query: " + util.inspect(rows)); }
		if(rows.length === 0) {
			throw new TypeError("Index does not exist: " + name);
		}
		return (rows.shift()||{}).indexdef;
	});
}
function pg_get_indexdef(self, name) {
	return do_query(self, 'SELECT indexdef FROM pg_indexes WHERE indexname = $1 LIMIT 1', [name]).then(function(rows) {
		if(!rows) { throw new TypeError("Unexpected result from query: " + util.inspect(rows)); }
		if(rows.length === 0) {
			throw new TypeError("Index does not exist: " + name);
		}
		return (rows.shift()||{}).indexdef;
	});
}
function pg_get_indexdef ( self , name ) { return do_query ( self , 'SELECT indexdef FROM pg_indexes WHERE indexname = $1 LIMIT 1' , [ name ] ) . then ( function ( rows ) { if ( ! rows ) { throw new TypeError ( "Unexpected result from query: " + util . inspect ( rows ) ) ; } if ( rows . length === 0 ) { throw new TypeError ( "Index does not exist: " + name ) ; } return ( rows . shift ( ) || { } ) . indexdef ; } ) ; }
Returns `true` if PostgreSQL database table has index like this one.
@todo Implement this in nor-pg and use here.
Returns true if PostgreSQL database table has index like this one .