-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a way to define primary and secondary XML Indexes #1624
Comments
Hi @ashishs |
@AlexeySoshin Even if this is created using a prepared statement, ther create missing columns method of the SchemaUtils breaks this. This happens in the code where indexes are checked. So creating the schema from code is not possible if XML indexes are used. |
@ashishs Regarding primary xml indexes, as a start, could you please confirm if creating it by leveraging val tester = object : Table("tester") {
val id = integer("id")
val primaryXml = xml("primary_xml_column") // assumes a custom column type
override val primaryKey = PrimaryKey(id)
init {
index("primary_xml_index", false, primaryXml, indexType = "PRIMARY XML")
}
}
// generates SQL
CREATE TABLE tester (id INT PRIMARY KEY, primary_xml_column XML NOT NULL)
CREATE PRIMARY XML INDEX primary_xml_index ON tester (primary_xml_column) If this doesn't work for you, please consider providing the exception you're getting, as well as how the xml column type is declared and registered for use, so we can take a further look. |
Exposed currently has no way to define xml indexes in MS SQL Server.
E.g:
Secondary xml indexes can be on PATH, VALUE, or PROPERTY
Documentation at XML Indexes
Note: a probable fix is to allow a listOf < DdlAware > objects to be added ad-hoc to a Table and have run after the table is created. The Index class is defined as a data class which prohibits subclassing.
The text was updated successfully, but these errors were encountered: