~ubuntu-branches/ubuntu/oneiric/postgresql-pljava/oneiric

« back to all changes in this revision

Viewing changes to src/java/pljava/org/postgresql/pljava/internal/SPI.java

  • Committer: Bazaar Package Importer
  • Author(s): Peter Eisentraut
  • Date: 2006-06-26 10:44:55 UTC
  • mfrom: (1.1.1 upstream) (3.1.1 edgy)
  • Revision ID: james.westby@ubuntu.com-20060626104455-135i9wosat2k8vvt
Tags: 1.3.0-1
* New upstream release (closes: #375199)
* Built for postgresql 8.1 (closes: #339641)
* Rebuilt for new libgcj library (closes: #369986)
* Updated copyright file
* Updated standards version
* Made use of cdbs simple patchsys

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (c) 2004, 2005 TADA AB - Taby Sweden
 
2
 * Copyright (c) 2004, 2005, 2006 TADA AB - Taby Sweden
3
3
 * Distributed under the terms shown in the file COPYRIGHT
4
4
 * found in the root folder of this project or at
5
5
 * http://eng.tada.se/osprojects/COPYRIGHT.html
12
12
 *
13
13
 * @author Thomas Hallgren
14
14
 */
15
 
public class SPI extends NativeStruct
 
15
public class SPI
16
16
{
17
17
        public static final int ERROR_CONNECT           = -1;
18
18
        public static final int ERROR_COPY                      = -2;
49
49
        {
50
50
                synchronized(Backend.THREADLOCK)
51
51
                {
52
 
                        return _exec(command, rowCount);
 
52
                        return _exec(System.identityHashCode(Thread.currentThread()), command, rowCount);
 
53
                }
 
54
        }
 
55
 
 
56
        public static void freeTupTable()
 
57
        {
 
58
                synchronized(Backend.THREADLOCK)
 
59
                {
 
60
                        _freeTupTable();
53
61
                }
54
62
        }
55
63
 
78
86
        /**
79
87
         * Returns the value of the global variable <code>SPI_tuptable</code>.
80
88
         */
81
 
        public static SPITupleTable getTupTable()
 
89
        public static TupleTable getTupTable(TupleDesc known)
82
90
        {
83
91
                synchronized(Backend.THREADLOCK)
84
92
                {
85
 
                        return _getTupTable();
 
93
                        return _getTupTable(known);
86
94
                }
87
95
        }
88
96
 
163
171
        return s;
164
172
        }
165
173
 
166
 
        private native static int _exec(String command, int rowCount);
 
174
        private native static int _exec(long threadId, String command, int rowCount);
167
175
        private native static int _getProcessed();
168
176
        private native static int _getResult();
169
 
        private native static SPITupleTable _getTupTable();
 
177
        private native static void _freeTupTable();
 
178
        private native static TupleTable _getTupTable(TupleDesc known);
170
179
}