All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ziclix.python.sql.procedure.SQLServerProcedure Maven / Gradle / Ivy

Go to download

Jython is an implementation of the high-level, dynamic, object-oriented language Python written in 100% Pure Java, and seamlessly integrated with the Java platform. It thus allows you to run Python on any Java platform.

There is a newer version: 2.7.4
Show newest version
/*
 * Jython Database Specification API 2.0
 *
 * $Id: SQLServerProcedure.java 2414 2005-02-23 04:26:23Z bzimmer $
 *
 * Copyright (c) 2002 brian zimmer 
 *
 */
package com.ziclix.python.sql.procedure;

import com.ziclix.python.sql.Procedure;
import com.ziclix.python.sql.PyCursor;
import org.python.core.Py;
import org.python.core.PyObject;

import java.sql.SQLException;

/**
 * Stored procedure support for SQLServer.
 *
 * @author brian zimmer
 * @author last revised by $Author: bzimmer $
 * @version $Revision: 2414 $
 */
public class SQLServerProcedure extends Procedure {

    public SQLServerProcedure(PyCursor cursor, PyObject name) throws SQLException {
        super(cursor, name);
    }

    protected PyObject getDefault() {
        return Py.None;
    }

    protected String getProcedureName() {

        StringBuffer proc = new StringBuffer();

        if (this.procedureSchema.__nonzero__()) {
            proc.append(this.procedureSchema.toString()).append(".");
        }

        return proc.append(this.procedureName.toString()).toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy