01: /*
02: * Jython Database Specification API 2.0
03: *
04: * $Id: SQLServerProcedure.java 2414 2005-02-23 04:26:23Z bzimmer $
05: *
06: * Copyright (c) 2002 brian zimmer <mailto:bzimmer@ziclix.com>
07: *
08: */
09: package com.ziclix.python.sql.procedure;
10:
11: import com.ziclix.python.sql.Procedure;
12: import com.ziclix.python.sql.PyCursor;
13: import org.python.core.Py;
14: import org.python.core.PyObject;
15:
16: import java.sql.SQLException;
17:
18: /**
19: * Stored procedure support for SQLServer.
20: *
21: * @author brian zimmer
22: * @author last revised by $Author: bzimmer $
23: * @version $Revision: 2414 $
24: */
25: public class SQLServerProcedure extends Procedure {
26:
27: public SQLServerProcedure(PyCursor cursor, PyObject name)
28: throws SQLException {
29: super (cursor, name);
30: }
31:
32: protected PyObject getDefault() {
33: return Py.None;
34: }
35:
36: protected String getProcedureName() {
37:
38: StringBuffer proc = new StringBuffer();
39:
40: if (this .procedureSchema.__nonzero__()) {
41: proc.append(this .procedureSchema.toString()).append(".");
42: }
43:
44: return proc.append(this.procedureName.toString()).toString();
45: }
46: }
|