-
Notifications
You must be signed in to change notification settings - Fork 379
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#1736] feat(postgresql): Support PostgreSQL index.
- Loading branch information
Showing
4 changed files
with
131 additions
and
20 deletions.
There are no files selected for viewing
74 changes: 74 additions & 0 deletions
74
...g-jdbc-common/src/main/java/com/datastrato/gravitino/catalog/jdbc/bean/JdbcIndexBean.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,74 @@ | ||
/* | ||
* Copyright 2024 Datastrato Pvt Ltd. | ||
* This software is licensed under the Apache License version 2. | ||
*/ | ||
package com.datastrato.gravitino.catalog.jdbc.bean; | ||
|
||
import com.datastrato.gravitino.rel.indexes.Index; | ||
import java.util.Objects; | ||
|
||
public class JdbcIndexBean { | ||
|
||
private final Index.IndexType indexType; | ||
|
||
private final String colName; | ||
|
||
private final String name; | ||
|
||
private final int order; | ||
|
||
public JdbcIndexBean(Index.IndexType indexType, String colName, String name, int order) { | ||
this.indexType = indexType; | ||
this.colName = colName; | ||
this.name = name; | ||
this.order = order; | ||
} | ||
|
||
public Index.IndexType getIndexType() { | ||
return indexType; | ||
} | ||
|
||
public String getColName() { | ||
return colName; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public int getOrder() { | ||
return order; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
JdbcIndexBean that = (JdbcIndexBean) o; | ||
return order == that.order | ||
&& indexType == that.indexType | ||
&& Objects.equals(colName, that.colName) | ||
&& Objects.equals(name, that.name); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(indexType, colName, name, order); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "JdbcIndexBean{" | ||
+ "indexType=" | ||
+ indexType | ||
+ ", colName='" | ||
+ colName | ||
+ '\'' | ||
+ ", name='" | ||
+ name | ||
+ '\'' | ||
+ ", order=" | ||
+ order | ||
+ '}'; | ||
} | ||
} |
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
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