use of com.infiniteautomation.mango.db.query.Index in project ma-core-public by infiniteautomation.
the class DataPointDao method getIndexes.
/* (non-Javadoc)
* @see com.serotonin.m2m2.db.dao.AbstractBasicDao#getIndexes()
*/
@Override
protected List<Index> getIndexes() {
List<Index> indexes = new ArrayList<Index>();
List<QueryAttribute> columns = new ArrayList<QueryAttribute>();
// Data Source Name Force
columns.add(new QueryAttribute("name", new HashSet<String>(), Types.VARCHAR));
indexes.add(new Index("nameIndex", "ds", columns, "ASC"));
// Data Source xid Force
columns = new ArrayList<QueryAttribute>();
columns.add(new QueryAttribute("xid", new HashSet<String>(), Types.VARCHAR));
indexes.add(new Index("dataSourcesUn1", "ds", columns, "ASC"));
// DeviceNameName Index Force
columns = new ArrayList<QueryAttribute>();
columns.add(new QueryAttribute("deviceName", new HashSet<String>(), Types.VARCHAR));
columns.add(new QueryAttribute("name", new HashSet<String>(), Types.VARCHAR));
indexes.add(new Index("deviceNameNameIndex", "dp", columns, "ASC"));
// xid point name force
columns = new ArrayList<QueryAttribute>();
columns.add(new QueryAttribute("xid", new HashSet<String>(), Types.VARCHAR));
columns.add(new QueryAttribute("name", new HashSet<String>(), Types.VARCHAR));
indexes.add(new Index("xidNameIndex", "dp", columns, "ASC"));
return indexes;
}
Aggregations