All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.dialect.MariaDB53Dialect Maven / Gradle / Ivy

The newest version!
/*
 * Hibernate, Relational Persistence for Idiomatic Java
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
 * See the lgpl.txt file in the root directory or .
 */
package org.hibernate.dialect;

import java.sql.Types;

import org.hibernate.dialect.function.SQLFunction;
import org.hibernate.dialect.function.StaticPrecisionFspTimestampFunction;

/**
 * @author Vlad Mihalcea
 */
public class MariaDB53Dialect extends MariaDBDialect {
	public MariaDB53Dialect() {
		super();

		// For details about MariaDB 5.3 support for fractional seconds
		// precision (fsp): https://mariadb.com/kb/en/mariadb/microseconds-in-mariadb/
		// Regarding datetime(fsp), "The fsp value, if given, must be
		// in the range 0 to 6. A value of 0 signifies that there is
		// no fractional part. If omitted, the default precision is 0.
		// (This differs from the standard SQL default of 6, for
		// compatibility with previous MariaDB versions.)".

		// The following is defined because Hibernate currently expects
		// the SQL 1992 default of 6 (which is inconsistent with the MariaDB
		// default).
		registerColumnType( Types.TIMESTAMP, "datetime(6)" );

		// MariaDB also supports fractional seconds precision for time values
		// (time(fsp)). According to SQL 1992, the default for 




© 2015 - 2024 Weber Informatics LLC | Privacy Policy