Examples of PyTuple


Examples of org.python.core.PyTuple

                // col name
                colInfo[0] = description.__getitem__(i).__getitem__(0);

                // col type
                colInfo[1] = description.__getitem__(i).__getitem__(1);
                columns[i] = new PyTuple(colInfo);
            }

            PyObject row = new PyTuple(columns);

            Py.writeDebug("db-source", row.toString());

            this.sentHeader = true;

            return row;
        }
View Full Code Here

Examples of org.python.core.PyTuple

    }

    public static PyTuple modf(double v) {
        double w = v % 1.0;
        v -= w;
        return new PyTuple(new PyFloat(w), new PyFloat(v));
    }
View Full Code Here

Examples of org.python.core.PyTuple

            for (; x >= 1.0; x *= 0.5, exponent++);

            x *= sign;
        }
        return new PyTuple(new PyFloat(x), new PyInteger(exponent));
    }
View Full Code Here

Examples of org.python.core.PyTuple

                                     PyType subtype,
                                     PyObject[] args,
                                     String[] keywords) {
                return new Instantiable(subtype);
            }
        }, PyType.TYPE, "subinst", new PyTuple(new PyObject[] {type}), new PyDictionary());
        Instantiable created = (Instantiable)instance.new_impl(true,
                                                               sub,
                                                               Py.EmptyObjects,
                                                               Py.NoKeywords);
        assertEquals("new's init isn't called when a subtype comes in", 0, created.timesCalled);
View Full Code Here

Examples of org.python.core.PyTuple

        try {
            all = (size < 0) ? true : all;

            while ((size-- > 0 || all) && this.resultSet.next()) {
                PyTuple tuple = createResult(this.resultSet, this.skipCols, this.description);
                res.append(tuple);
                this.rowcount++;
                this.rownumber = this.resultSet.getRow();
            }
        } catch (AbstractMethodError e) {
View Full Code Here

Examples of org.python.core.PyTuple

            // there are three parts: (reason, state, vendorCode)
            PyObject[] warn =
                Py.javas2pys(warning.getMessage(), warning.getSQLState(), warning.getErrorCode());

            // add the warning to the list
            ((PyList)this.warnings).append(new PyTuple(warn));

            warning = warning.getNextWarning();
        }
    }
View Full Code Here

Examples of org.python.core.PyTuple

                    a[5] = Py.None;
                    break;
            }

            a[6] = Py.newInteger(meta.isNullable(i));
            ((PyList) metadata).append(new PyTuple(a));
        }

        return metadata;
    }
View Full Code Here

Examples of org.python.core.PyTuple

                            break;
                    }

                    int nullable = column.__getitem__(Procedure.NULLABLE).asInt();
                    a[6] = (nullable == DatabaseMetaData.procedureNullable) ? Py.One : Py.Zero;
                    ((PyList) metadata).append(new PyTuple(a));
                    break;
            }
        }

        return metadata;
View Full Code Here

Examples of org.python.core.PyTuple

        SQLWarning warning = set.getWarnings();
        if (warning != null) {
            fireWarning(warning);
        }

        return new PyTuple(row);
    }
View Full Code Here

Examples of org.python.core.PyTuple

        final private void load_tuple() {
            PyObject[] arr = new PyObject[marker()];
            pop(arr);
            pop();
            push(new PyTuple(arr));
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.