예제 #1
0
pgObject *pgTriggerFunctionFactory::CreateObjects(pgCollection *collection, ctlTree *browser, const wxString &restr)
{
	wxString funcRestriction = wxT(
	                               " WHERE proisagg = FALSE AND pronamespace = ") + NumToStr(collection->GetSchema()->GetOid())
	                           + wxT("::oid\n   AND typname = 'trigger'\n")
	                           + wxT("   AND lanname != 'edbspl'\n");

	// Get the Functions
	return AppendFunctions(collection, collection->GetSchema(), browser, funcRestriction);
}
예제 #2
0
pgObject *edbPackageProcedureFactory::CreateObjects(pgCollection *collection, ctlTree *browser, const wxString &restriction)
{
	wxString restr;

	if (collection->GetDatabase()->GetConnection()->EdbMinimumVersion(8, 2))
		restr = wxT(" WHERE format_type(prorettype, NULL) = 'void' AND pronamespace = ");
	else
		restr = wxT(" WHERE eltclass = 'P' AND packageoid = ");

	restr += ((edbPackageObjCollection *)collection)->GetPackage()->GetOidStr();
	restr += restriction;

	return AppendFunctions(collection, ((edbPackageObjCollection *)collection)->GetPackage(), browser, restr);
}
예제 #3
0
pgObject *pgProcedureFactory::CreateObjects(pgCollection *collection, ctlTree *browser, const wxString &restr)
{
	wxString funcRestriction = wxT(
	                               " WHERE proisagg = FALSE AND pronamespace = ") + NumToStr(collection->GetSchema()->GetOid())
	                           + wxT("::oid AND lanname = 'edbspl'\n");

	if (collection->GetConnection()->EdbMinimumVersion(8, 1))
		funcRestriction += wxT("   AND protype = '1'\n");
	else
		funcRestriction += wxT("   AND typname = 'void'\n");

	// Get the Functions
	return AppendFunctions(collection, collection->GetSchema(), browser, funcRestriction);
}