Record Class QueryOption.Comment
java.lang.Object
java.lang.Record
org.hibernate.query.QueryOption.Comment
- Record Components:
comment- The text of the comment
- All Implemented Interfaces:
Statement.Option, TypedQuery.Option
- Enclosing interface:
QueryOption
public static record QueryOption.Comment(String comment)
extends Record
implements TypedQuery.Option, Statement.Option
Specifies a comment for the SQL query.
If SQL commenting is enabled, the comment will be added to the SQL query sent to the database, which may be useful for identifying the source of troublesome queries.
SQL commenting may be enabled using the configuration property "hibernate.use_sql_comments".
- Since:
- 8.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomment()Returns the value of thecommentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Comment
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
comment
-