added getDbMapping(typename) method that gets the DbMapping for

a prototype name.

changed sql argument encoding utility method: single quotes are now
encoded as '' instead of \'
This commit is contained in:
hns 2002-07-04 17:33:56 +00:00
parent d66a280200
commit df4d199072

View file

@ -985,6 +985,14 @@ public final class NodeManager {
return node; return node;
} }
/**
* Get a DbMapping for a given prototype name. This is just a proxy
* method to the app's getDbMapping() method.
*/
public DbMapping getDbMapping (String protoname) {
return app.getDbMapping (protoname);
}
// a utility method to escape single quotes // a utility method to escape single quotes
private String escape (String str) { private String escape (String str) {
if (str == null) if (str == null)
@ -996,7 +1004,7 @@ public final class NodeManager {
for (int i=0; i<l; i++) { for (int i=0; i<l; i++) {
char c = str.charAt (i); char c = str.charAt (i);
if (c == '\'') if (c == '\'')
sbuf.append ("\\"); sbuf.append ('\'');
sbuf.append (c); sbuf.append (c);
} }
return sbuf.toString (); return sbuf.toString ();