| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Jython Database Specification API 2.0 | 3 * Jython Database Specification API 2.0 |
| 4 * | 4 * |
| 5 * $Id$ | 5 * $Id$ |
| 6 * | 6 * |
| 7 * Copyright (c) 2001 brian zimmer <bzimmer@ziclix.com> | 7 * Copyright (c) 2001 brian zimmer <bzimmer@ziclix.com> |
| 8 * | 8 * |
| 9 */ | 9 */ |
| 10 package com.ziclix.python.sql; | 10 package com.ziclix.python.sql; |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 super.__setattr__(name, value); | 189 super.__setattr__(name, value); |
| 190 } | 190 } |
| 191 } | 191 } |
| 192 | 192 |
| 193 /** | 193 /** |
| 194 * Gets the value of the attribute name. | 194 * Gets the value of the attribute name. |
| 195 * | 195 * |
| 196 * @param name | 196 * @param name |
| 197 * @return the attribute for the given name | 197 * @return the attribute for the given name |
| 198 */ | 198 */ |
| 199 public PyObject __findattr__(String name) { | 199 public PyObject __findattr_ex__(String name) { |
| 200 | 200 |
| 201 if ("arraysize".equals(name)) { | 201 if ("arraysize".equals(name)) { |
| 202 return Py.newInteger(arraysize); | 202 return Py.newInteger(arraysize); |
| 203 } else if ("softspace".equals(name)) { | 203 } else if ("softspace".equals(name)) { |
| 204 return Py.newInteger(softspace); | 204 return Py.newInteger(softspace); |
| 205 } else if ("__methods__".equals(name)) { | 205 } else if ("__methods__".equals(name)) { |
| 206 return __methods__; | 206 return __methods__; |
| 207 } else if ("__members__".equals(name)) { | 207 } else if ("__members__".equals(name)) { |
| 208 return __members__; | 208 return __members__; |
| 209 } else if ("description".equals(name)) { | 209 } else if ("description".equals(name)) { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 229 return Py.newBoolean(closed); | 229 return Py.newBoolean(closed); |
| 230 } else if ("callproc".equals(name)) { | 230 } else if ("callproc".equals(name)) { |
| 231 try { | 231 try { |
| 232 // dynamically decide on the the attribute based on the driver | 232 // dynamically decide on the the attribute based on the driver |
| 233 if (!getMetaData().supportsStoredProcedures()) { | 233 if (!getMetaData().supportsStoredProcedures()) { |
| 234 return null; | 234 return null; |
| 235 } | 235 } |
| 236 } catch (Throwable t) {} | 236 } catch (Throwable t) {} |
| 237 } | 237 } |
| 238 | 238 |
| 239 return super.__findattr__(name); | 239 return super.__findattr_ex__(name); |
| 240 } | 240 } |
| 241 | 241 |
| 242 /** | 242 /** |
| 243 * Initializes the object's namespace. | 243 * Initializes the object's namespace. |
| 244 * | 244 * |
| 245 * @param dict | 245 * @param dict |
| 246 */ | 246 */ |
| 247 static public void classDictInit(PyObject dict) { | 247 static public void classDictInit(PyObject dict) { |
| 248 | 248 |
| 249 dict.__setitem__("__version__", Py.newString("$Revision$").__getslice__(Py.n
ewInteger(11), Py.newInteger(-2), null)); | 249 dict.__setitem__("__version__", Py.newString("$Revision$").__getslice__(Py.n
ewInteger(11), Py.newInteger(-2), null)); |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 983 cursor.callproc(sql, params, bindings, maxrows); | 983 cursor.callproc(sql, params, bindings, maxrows); |
| 984 return Py.None; | 984 return Py.None; |
| 985 case 9 : | 985 case 9 : |
| 986 cursor.executemany(sql, params, bindings, maxrows); | 986 cursor.executemany(sql, params, bindings, maxrows); |
| 987 return Py.None; | 987 return Py.None; |
| 988 default : | 988 default : |
| 989 throw info.unexpectedCall(args.length, true); | 989 throw info.unexpectedCall(args.length, true); |
| 990 } | 990 } |
| 991 } | 991 } |
| 992 } | 992 } |
| OLD | NEW |