Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CONJ-1009] improve performance reading result-set of big size part 3
* JSON metadata correction
- Loading branch information
Showing
4 changed files
with
45 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/main/java/org/mariadb/jdbc/client/column/JsonColumn.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// SPDX-License-Identifier: LGPL-2.1-or-later | ||
// Copyright (c) 2012-2014 Monty Program Ab | ||
// Copyright (c) 2015-2021 MariaDB Corporation Ab | ||
|
||
package org.mariadb.jdbc.client.column; | ||
|
||
import org.mariadb.jdbc.Configuration; | ||
import org.mariadb.jdbc.client.ColumnDecoder; | ||
import org.mariadb.jdbc.client.DataType; | ||
import org.mariadb.jdbc.client.ReadableByteBuf; | ||
import java.sql.*; | ||
|
||
/** Column metadata definition */ | ||
public class JsonColumn extends StringColumn implements ColumnDecoder { | ||
|
||
public JsonColumn( | ||
ReadableByteBuf buf, | ||
int charset, | ||
long length, | ||
DataType dataType, | ||
byte decimals, | ||
int flags, | ||
int[] stringPos, | ||
String extTypeName, | ||
String extTypeFormat) { | ||
super(buf, charset, length, dataType, decimals, flags, stringPos, extTypeName, extTypeFormat); | ||
} | ||
|
||
public String defaultClassname(Configuration conf) { | ||
return String.class.getName(); | ||
} | ||
|
||
public int getColumnType(Configuration conf) { | ||
return Types.LONGVARCHAR; | ||
} | ||
|
||
public String getColumnTypeName(Configuration conf) { | ||
return "JSON"; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters