/*
* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 2.0, as published by the
* Free Software Foundation.
*
* This program is also distributed with certain software (including but not
* limited to OpenSSL) that is licensed under separate terms, as designated in a
* particular file or component or in included license documentation. The
* authors of MySQL hereby grant you an additional permission to link the
* program and your derivative works with the separately licensed software that
* they have included with MySQL.
*
* Without limiting anything contained in the foregoing, this file, which is
* part of MySQL Connector/J, is also subject to the Universal FOSS Exception,
* version 1.0, a copy of which can be found at
* http://oss.oracle.com/licenses/universal-foss-exception.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
* for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
package com.mysql.cj.x.protobuf;
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mysqlx_crud.proto
@SuppressWarnings({ "deprecation" })
public final class MysqlxCrud {
private MysqlxCrud() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
/**
* <pre>
**
*DataModel to use for filters, names, ...
* </pre>
*
* Protobuf enum {@code Mysqlx.Crud.DataModel}
*/
public enum DataModel
implements com.google.protobuf.ProtocolMessageEnum {
/**
* <code>DOCUMENT = 1;</code>
*/
DOCUMENT(1),
/**
* <code>TABLE = 2;</code>
*/
TABLE(2),
;
/**
* <code>DOCUMENT = 1;</code>
*/
public static final int DOCUMENT_VALUE = 1;
/**
* <code>TABLE = 2;</code>
*/
public static final int TABLE_VALUE = 2;
public final int getNumber() {
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static DataModel valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static DataModel forNumber(int value) {
switch (value) {
case 1: return DOCUMENT;
case 2: return TABLE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<DataModel>
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
DataModel> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<DataModel>() {
public DataModel findValueByNumber(int number) {
return DataModel.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.mysql.cj.x.protobuf.MysqlxCrud.getDescriptor().getEnumTypes().get(0);
}
private static final DataModel[] VALUES = values();
public static DataModel valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int value;
private DataModel(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:Mysqlx.Crud.DataModel)
}
/**
* <pre>
**
*ViewAlgorithm defines how MySQL Server processes the view
* </pre>
*
* Protobuf enum {@code Mysqlx.Crud.ViewAlgorithm}
*/
public enum ViewAlgorithm
implements com.google.protobuf.ProtocolMessageEnum {
/**
* <pre>
** MySQL chooses which algorithm to use
* </pre>
*
* <code>UNDEFINED = 1;</code>
*/
UNDEFINED(1),
/**
* <pre>
** the text of a statement that refers to the view and the view
*definition are merged
* </pre>
*
* <code>MERGE = 2;</code>
*/
MERGE(2),
/**
* <pre>
** the view are retrieved into a temporary table
* </pre>
*
* <code>TEMPTABLE = 3;</code>
*/
TEMPTABLE(3),
;
/**
* <pre>
** MySQL chooses which algorithm to use
* </pre>
*
* <code>UNDEFINED = 1;</code>
*/
public static final int UNDEFINED_VALUE = 1;
/**
* <pre>
** the text of a statement that refers to the view and the view
*definition are merged
* </pre>
*
* <code>MERGE = 2;</code>
*/
public static final int MERGE_VALUE = 2;
/**
* <pre>
** the view are retrieved into a temporary table
* </pre>
*
* <code>TEMPTABLE = 3;</code>
*/
public static final int TEMPTABLE_VALUE = 3;
public final int getNumber() {
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ViewAlgorithm valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static ViewAlgorithm forNumber(int value) {
switch (value) {
case 1: return UNDEFINED;
case 2: return MERGE;
case 3: return TEMPTABLE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<ViewAlgorithm>
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ViewAlgorithm> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<ViewAlgorithm>() {
public ViewAlgorithm findValueByNumber(int number) {
return ViewAlgorithm.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.mysql.cj.x.protobuf.MysqlxCrud.getDescriptor().getEnumTypes().get(1);
}
private static final ViewAlgorithm[] VALUES = values();
public static ViewAlgorithm valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() !
mysql-connector-j-8.0.31.7z
需积分: 0 184 浏览量
更新于2023-01-24
收藏 4.44MB 7Z 举报
MySQL是世界上最受欢迎的开源关系型数据库管理系统之一,其性能强大且易于使用,广泛应用于Web应用程序、数据存储和分析等场景。MySQL的Java连接器(JDBC)是连接Java应用程序与MySQL数据库的关键组件,允许Java开发者通过编写Java代码来执行SQL查询和管理数据库。
标题中的"mysql-connector-j-8.0.31.7z"指的是MySQL的Java连接器(MySQL Connector/J)的版本8.0.31,打包成7z格式的压缩文件。7z是一种高效的文件压缩格式,提供比ZIP更好的压缩率。这个特定的版本8.0.31意味着它包含了最新的功能改进和安全修复,适用于与MySQL 8.0.x系列服务器的兼容性。
MySQL Connector/J是MySQL官方提供的JDBC驱动程序,符合Java Database Connectivity (JDBC) API标准。JDBC是Java平台的一个核心部分,它定义了一组接口和类,用于在Java应用程序中创建数据库连接,执行SQL语句,以及处理结果集。通过这个驱动,Java开发者可以在应用程序中使用标准的JDBC API与MySQL数据库进行通信。
使用MySQL Connector/J的步骤大致如下:
1. **下载与安装**:你需要从MySQL官网下载mysql-connector-j-8.0.31的压缩文件,然后解压到本地系统。通常,将其添加到Java项目的类路径(classpath)中,以便在运行时可以找到。
2. **配置连接**:在Java代码中,你需要通过`DriverManager.getConnection()`方法建立与MySQL服务器的连接。这通常需要设置数据库URL、用户名和密码,例如:
```java
String url = "jdbc:mysql://localhost:3306/mydatabase";
String user = "myuser";
String password = "mypassword";
Connection conn = DriverManager.getConnection(url, user, password);
```
3. **执行SQL操作**:一旦连接建立,你可以使用`Statement`或`PreparedStatement`对象来执行SQL语句,如查询、插入、更新和删除数据。
4. **处理结果集**:对于查询语句,`ResultSet`对象将包含返回的结果。你可以遍历结果集并获取每行数据。
5. **关闭资源**:使用完连接后,记得关闭`ResultSet`、`Statement`和`Connection`,以释放数据库资源。
MySQL Connector/J支持多种特性,包括事务处理、批处理、预编译的SQL语句、连接池等,这些都是Java应用程序与数据库交互的重要功能。此外,它还支持SSL加密,确保了数据传输的安全性。
"mysql-connector-j-8.0.31.7z"是用于Java应用程序与MySQL数据库之间通信的驱动程序,提供了高效、可靠的JDBC接口。通过理解和正确使用这个驱动,开发者可以构建稳定、高性能的数据库应用程序。
qxmjava
- 粉丝: 24
- 资源: 712
最新资源
- matlab储能蓄电池pq控制
- 四轮独立驱动 转向路径跟踪及车辆稳定性控制 模型预测控制MPC 上层4WS+DYC,下层阿克曼转向分配和最小轮胎负荷率驱动力矩分配
- requirements-before.txt
- 基于机器学习的入侵检测系统python源码+文档说明(高分项目)
- 云计算的文件,上次漏的
- 基于机器学习的入侵检测系统python源码+入侵检测技术文档说明
- 基于机器学习的入侵检测系统python源码+报告文档(高分项目)
- pytorch基于LSTM、GRU、BPNN进行时间序列预测源码+数据(高分项目)
- 基于51单片机的自动浇花系统(原理图+程序+PCB或洞洞板+参考论文等)
- pytorch基于LSTM、GRU、BPNN进行时间序列预测源码(高分项目)
- 基于python+opencv实现的柚子缺陷识别检测源码 (高分项目).zip
- CH32V208GBU6-PWM20250107-195029.7z
- 大规模语言模型推理优化:动态裁剪加速长文本情境的LLM生成
- 多目标点路径规划-蚁群+A*算法 室内旅行商问题-送餐移动机器人(从厨房出发到达多个目标点,最后返回厨房) 1,A*算法规划两两之间的路径,并计算路径长度; 2,蚁群算法依据两点之间路径长度,规划
- 永磁同步电机(PMSM)无刷直流电机(BLDC)有限集模型预测控制(MPC) 电机MPC控制 matlab simulink仿真模型(2017) 能很好的运行,并且能达到比较理想的效果,比传统的PWM
- OpenCV4.7.0 编译过程相关资源包