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:
parent
d66a280200
commit
df4d199072
1 changed files with 10 additions and 2 deletions
|
@ -985,6 +985,14 @@ public final class NodeManager {
|
|||
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
|
||||
private String escape (String str) {
|
||||
if (str == null)
|
||||
|
@ -996,7 +1004,7 @@ public final class NodeManager {
|
|||
for (int i=0; i<l; i++) {
|
||||
char c = str.charAt (i);
|
||||
if (c == '\'')
|
||||
sbuf.append ("\\");
|
||||
sbuf.append ('\'');
|
||||
sbuf.append (c);
|
||||
}
|
||||
return sbuf.toString ();
|
||||
|
|
Loading…
Add table
Reference in a new issue