8785481999-07-01Henrik Grubbström (Grubba) /*
485cb11999-07-01Henrik Grubbström (Grubba)  * $Id: sql_util.pmod,v 1.2 1999/07/01 20:25:38 grubba Exp $
8785481999-07-01Henrik Grubbström (Grubba)  * * Some SQL utility functions. * They are kept here to avoid circular references. * * Henrik Grubbström 1999-07-01 */ //. //. File: sql_util.pmod
485cb11999-07-01Henrik Grubbström (Grubba) //. RCSID: $Id: sql_util.pmod,v 1.2 1999/07/01 20:25:38 grubba Exp $
8785481999-07-01Henrik Grubbström (Grubba) //. Author: Henrik Grubbström (grubba@idonex.se) //. //. Synopsis: Some SQL utility functions //. //. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //. //. These functions are kept here mainly to avoid circular references. //. //. - quote //. Quote a string so that it can safely be put in a query. //. > s - String to quote. string quote(string s) { return(replace(s, "\'", "\'\'")); } //. - fallback //. Throw an error in case an unimplemented function is called.
485cb11999-07-01Henrik Grubbström (Grubba) void fallback()
8785481999-07-01Henrik Grubbström (Grubba) {
485cb11999-07-01Henrik Grubbström (Grubba)  throw(({ "Function not supported in this database.", backtrace() }));
8785481999-07-01Henrik Grubbström (Grubba) }