annotate src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiTupleLineParser.java @ 93:eeb71f7d36bf embedded

Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
author Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
date Fri, 06 Jan 2017 12:36:33 +0000 (2017-01-06)
parents 6f74e01c57da
children 4bb4e988164d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
1 /*
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
2 * This Source Code Form is subject to the terms of the Mozilla Public
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
5 *
91
6f74e01c57da Made fixings regarding the null values retrieval. The JDBC embedded connection is working!!! :) Some more testing, optimizations and compilations fixes are still required.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 88
diff changeset
6 * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V.
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
7 */
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
8
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
9 package nl.cwi.monetdb.mcl.protocol.oldmapi;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
10
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
11 import nl.cwi.monetdb.jdbc.MonetBlob;
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
12 import nl.cwi.monetdb.jdbc.MonetClob;
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
13 import nl.cwi.monetdb.mcl.connection.helpers.GregorianCalendarParser;
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
14 import nl.cwi.monetdb.mcl.protocol.ProtocolException;
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
15
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
16 import java.math.BigDecimal;
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
17 import java.math.BigInteger;
74
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
18 import java.nio.CharBuffer;
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
19 import java.sql.Types;
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
20 import java.text.ParsePosition;
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
21 import java.util.Calendar;
88
1bba35253aaf Finished the mappings in the JDBC embedded connection. Now what is left to do is testing (the JDBC embedded connection needs extensive testing), compile for other OS than Linux, merge with the Dec16 branch (headless) and some possible optimizations.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 87
diff changeset
22
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
23 final class OldMapiTupleLineParser {
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
24
74
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
25 private static final char[] NULL_STRING = "NULL".toCharArray();
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
26
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
27 private static int CharIndexOf(char[] source, int sourceCount, char[] target, int targetCount) {
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
28 if (targetCount == 0) {
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
29 return 0;
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
30 }
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
31
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
32 char first = target[0];
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
33 int max = sourceCount - targetCount;
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
34
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
35 for (int i = 0; i <= max; i++) {
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
36 /* Look for first character. */
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
37 if (source[i] != first) {
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
38 while (++i <= max && source[i] != first);
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
39 }
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
40
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
41 /* Found first character, now look at the rest of v2 */
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
42 if (i <= max) {
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
43 int j = i + 1;
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
44 int end = j + targetCount - 1;
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
45 for (int k = 1; j < end && source[j] == target[k]; j++, k++);
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
46
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
47 if (j == end) {
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
48 /* Found whole string. */
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
49 return i;
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
50 }
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
51 }
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
52 }
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
53 return -1;
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
54 }
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
55
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
56 static int OldMapiParseTupleLine(int lineNumber, CharBuffer lineBuffer, StringBuilder helper, int[] typesMap,
93
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
57 Object[] values, boolean[][] nulls) throws ProtocolException {
74
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
58 int len = lineBuffer.limit();
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
59 char[] array = lineBuffer.array();
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
60
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
61 // first detect whether this is a single value line (=) or a real tuple ([)
74
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
62 if (array[0] == '=') {
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
63 if (typesMap.length != 1) {
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
64 throw new ProtocolException(typesMap.length + " columns expected, but only single value found");
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
65 }
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
66 // return the whole string but the leading =
74
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
67 OldMapiStringToJavaObjectConverter(new String(array, 1, len - 1), lineNumber, values[0], typesMap[0]);
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
68 return 1;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
69 }
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
70
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
71 // extract separate fields by examining string, char for char
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
72 boolean inString = false, escaped = false;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
73 int cursor = 2, column = 0, i = 2;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
74 for (; i < len; i++) {
74
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
75 switch(array[i]) {
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
76 default:
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
77 escaped = false;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
78 break;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
79 case '\\':
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
80 escaped = !escaped;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
81 break;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
82 case '"':
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
83 /**
74
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
84 * If all strings are wrapped between two quotes, a \" can never exist outside a string. Thus if we
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
85 * believe that we are not within a string, we can safely assume we're about to enter a string if we
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
86 * find a quote. If we are in a string we should stop being in a string if we find a quote which is
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
87 * not prefixed by a \, for that would be an escaped quote. However, a nasty situation can occur
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
88 * where the string is like "test \\" as obvious, a test for a \ in front of a " doesn't hold here
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
89 * for all cases. Because "test \\\"" can exist as well, we need to know if a quote is prefixed by
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
90 * an escaping slash or not.
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
91 */
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
92 if (!inString) {
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
93 inString = true;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
94 } else if (!escaped) {
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
95 inString = false;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
96 }
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
97
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
98 // reset escaped flag
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
99 escaped = false;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
100 break;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
101 case '\t':
74
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
102 if (!inString && (i > 0 && array[i - 1] == ',') || (i + 1 == len - 1 && array[++i] == ']')) { // dirty
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
103 // split!
74
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
104 if (array[cursor] == '"' && array[i - 2] == '"') {
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
105 // reuse the StringBuilder by cleaning it
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
106 helper.setLength(0);
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
107 // prevent capacity increases
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
108 helper.ensureCapacity((i - 2) - (cursor + 1));
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
109 for (int pos = cursor + 1; pos < i - 2; pos++) {
74
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
110 if (array[cursor] == '\\' && pos + 1 < i - 2) {
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
111 pos++;
74
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
112 // strToStr and strFromStr in gdk_atoms.mx only support \t \n \\ \" and \377
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
113 switch (array[pos]) {
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
114 case '\\':
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
115 helper.append('\\');
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
116 break;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
117 case 'n':
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
118 helper.append('\n');
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
119 break;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
120 case 't':
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
121 helper.append('\t');
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
122 break;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
123 case '"':
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
124 helper.append('"');
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
125 break;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
126 case '0': case '1': case '2': case '3':
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
127 // this could be an octal number, let's check it out
74
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
128 if (pos + 2 < i - 2 && array[pos + 1] >= '0' && array[pos + 1] <= '7' &&
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
129 array[pos + 2] >= '0' && array[pos + 2] <= '7') {
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
130 // we got the number!
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
131 try {
74
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
132 helper.append((char)(Integer.parseInt("" + array[pos] + array[pos + 1] + array[pos + 2], 8)));
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
133 pos += 2;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
134 } catch (NumberFormatException e) {
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
135 // hmmm, this point should never be reached actually...
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
136 throw new AssertionError("Flow error, should never try to parse non-number");
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
137 }
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
138 } else {
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
139 // do default action if number seems not to be correct
74
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
140 helper.append(array[pos]);
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
141 }
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
142 break;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
143 default:
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
144 // this is wrong, just ignore the escape, and print the char
74
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
145 helper.append(array[pos]);
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
146 break;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
147 }
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
148 } else {
74
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
149 helper.append(array[pos]);
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
150 }
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
151 }
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
152 // put the unescaped string in the right place
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
153 OldMapiStringToJavaObjectConverter(helper.toString(), lineNumber, values[column], typesMap[column]);
93
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
154 nulls[column][lineNumber] = false;
74
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
155 } else if ((i - 1) - cursor == 4 && CharIndexOf(array, array.length, NULL_STRING, NULL_STRING.length) == cursor) {
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
156 SetNullValue(lineNumber, values[column], typesMap[column]);
93
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
157 nulls[column][lineNumber] = true;
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
158 } else {
74
17365ed26611 In Java, you cannot get a pointer to a String, in order to make a faster memory copy. So I had to change a StringBuilder to a CharBuffer which allows to retrieve the pointer and make a faster processing.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
159 OldMapiStringToJavaObjectConverter(new String(array, cursor, i - 1 - cursor), lineNumber, values[column], typesMap[column]);
93
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
160 nulls[column][lineNumber] = false;
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
161 }
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
162 column++;
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
163 cursor = i + 1;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
164 }
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
165 // reset escaped flag
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
166 escaped = false;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
167 break;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
168 }
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
169 }
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
170 // check if this result is of the size we expected it to be
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
171 if (column != typesMap.length)
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
172 throw new ProtocolException("illegal result length: " + column + "\nlast read: " + (column > 0 ? values[column - 1] : "<none>"));
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
173 return column;
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
174 }
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
175
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
176 private static byte[] BinaryBlobConverter(String toParse) {
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
177 int len = toParse.length() / 2;
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
178 byte[] res = new byte[len];
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
179 for (int i = 0; i < len; i++) {
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
180 res[i] = (byte) Integer.parseInt(toParse.substring(2 * i, (2 * i) + 2), 16);
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
181 }
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
182 return res;
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
183 }
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
184
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
185 private static final ParsePosition Ppos = new ParsePosition(0);
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
186
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
187 private static void OldMapiStringToJavaObjectConverter(String toParse, int lineNumber, Object columnArray,
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
188 int jDBCMapping) throws ProtocolException {
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
189 switch (jDBCMapping) {
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
190 case Types.BOOLEAN:
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
191 ((boolean[]) columnArray)[lineNumber] = Boolean.parseBoolean(toParse);
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
192 break;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
193 case Types.TINYINT:
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
194 ((byte[]) columnArray)[lineNumber] = Byte.parseByte(toParse);
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
195 break;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
196 case Types.SMALLINT:
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
197 ((short[]) columnArray)[lineNumber] = Short.parseShort(toParse);
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
198 break;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
199 case Types.INTEGER:
93
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
200 ((int[]) columnArray)[lineNumber] = Integer.parseInt(toParse.replace(".", "")); //intervals :(
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
201 break;
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
202 case Types.BIGINT:
93
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
203 ((long[]) columnArray)[lineNumber] = Long.parseLong(toParse.replace(".", "")); //intervals :(
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
204 break;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
205 case Types.REAL:
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
206 ((float[]) columnArray)[lineNumber] = Float.parseFloat(toParse);
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
207 break;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
208 case Types.DOUBLE:
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
209 ((double[]) columnArray)[lineNumber] = Double.parseDouble(toParse);
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
210 break;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
211 case Types.DECIMAL:
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
212 ((BigDecimal[]) columnArray)[lineNumber] = new BigDecimal(toParse);
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
213 break;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
214 case Types.NUMERIC:
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
215 ((BigInteger[]) columnArray)[lineNumber] = new BigInteger(toParse);
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
216 break;
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
217 case Types.CHAR:
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
218 case Types.VARCHAR:
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
219 case Types.LONGVARCHAR:
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
220 case Types.OTHER:
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
221 ((String[]) columnArray)[lineNumber] = toParse;
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
222 break;
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
223 case Types.DATE:
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
224 ((Calendar[]) columnArray)[lineNumber] = GregorianCalendarParser.ParseDate(toParse, Ppos);
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
225 break;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
226 case Types.TIME:
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
227 ((Calendar[]) columnArray)[lineNumber] = GregorianCalendarParser.ParseTime(toParse, Ppos, false);
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
228 break;
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
229 case Types.TIME_WITH_TIMEZONE:
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
230 ((Calendar[]) columnArray)[lineNumber] = GregorianCalendarParser.ParseTime(toParse, Ppos, true);
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
231 break;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
232 case Types.TIMESTAMP:
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
233 ((Calendar[]) columnArray)[lineNumber] = GregorianCalendarParser.ParseTimestamp(toParse, Ppos, false);
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
234 break;
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
235 case Types.TIMESTAMP_WITH_TIMEZONE:
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
236 ((Calendar[]) columnArray)[lineNumber] = GregorianCalendarParser.ParseTimestamp(toParse, Ppos, true);
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
237 break;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
238 case Types.CLOB:
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
239 ((MonetClob[]) columnArray)[lineNumber] = new MonetClob(toParse);
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
240 break;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
241 case Types.BLOB:
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
242 ((MonetBlob[]) columnArray)[lineNumber] = new MonetBlob(BinaryBlobConverter(toParse));
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
243 break;
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
244 case Types.LONGVARBINARY:
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 74
diff changeset
245 ((byte[][]) columnArray)[lineNumber] = BinaryBlobConverter(toParse);
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
246 break;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
247 default:
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
248 throw new ProtocolException("Unknown type!");
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
249 }
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
250 }
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
251
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
252 private static void SetNullValue(int lineNumber, Object columnArray, int jDBCMapping) throws ProtocolException {
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
253 switch (jDBCMapping) {
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
254 case Types.BOOLEAN:
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
255 ((boolean[]) columnArray)[lineNumber] = false;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
256 break;
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
257 case Types.TINYINT:
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
258 ((byte[]) columnArray)[lineNumber] = Byte.MIN_VALUE;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
259 break;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
260 case Types.SMALLINT:
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
261 ((short[]) columnArray)[lineNumber] = Short.MIN_VALUE;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
262 break;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
263 case Types.INTEGER:
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
264 ((int[]) columnArray)[lineNumber] = Integer.MIN_VALUE;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
265 break;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
266 case Types.BIGINT:
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
267 ((long[]) columnArray)[lineNumber] = Long.MIN_VALUE;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
268 break;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
269 case Types.REAL:
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
270 ((float[]) columnArray)[lineNumber] = Float.MIN_VALUE;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
271 break;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
272 case Types.DOUBLE:
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
273 ((double[]) columnArray)[lineNumber] = Double.MIN_VALUE;
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
274 break;
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
275 default:
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
276 ((Object[]) columnArray)[lineNumber] = null;
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
277 }
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
278 }
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
279 }