public class QueryField extends QueryFieldAbstract<String,net.idea.modbcum.q.conditions.StringCondition,net.idea.modbcum.q.conditions.StringCondition>
AbstractStructureQuery.FIELD_NAMES
caseSensitive, nameCondition, queryField, queryValueCaseInsensitive, queryValueCaseSensitive, retrieveProperties, searchMode, sqlField, sqlField_ci, sqlFieldProperties
chemicalsOnly, group, nanomaterial, order_descendant, where_group
condition, fieldname, id, logger, maxRecords, name, page, selected, value
Constructor and Description |
---|
QueryField()
//FASTER!!!!!!
select idchemical,idstructure from structure
join
(
select distinct(s1.idchemical)
from structure s1
join property_values using(idstructure)
join property_string using (idvalue_string)
join properties using(idproperty)
where lower(value)='hexane'
) a using(idchemical)
where preferred=1
limit 1
--even faster
SELECT s1.idchemical, s1.idstructure, s1.preference,s1.type_structure,value,name,comments
FROM structure s1
LEFT JOIN structure s2 ON s1.idchemical = s2.idchemical AND s1.preference > s2.preference
join (
select distinct(idchemical),group_concat(distinct value SEPARATOR ';') as value,group_concat(distinct name) as name,group_concat(distinct comments) as comments
from structure
join property_values using(idstructure)
join property_string using (idvalue_string)
join properties using(idproperty)
where lower(value) regexp '^benzene'
) a on a.idchemical=s1.idchemical
where s2.idchemical is null;
|
Modifier and Type | Method and Description |
---|---|
List<net.idea.modbcum.i.query.QueryParam> |
getParameters() |
String |
getSQL() |
String |
toString() |
getNameCondition, getObject, isCaseSensitive, isRetrieveProperties, isSearchByAlias, setCaseSensitive, setNameCondition, setRetrieveProperties, setSearchByAlias
calculateMetric, isChemicalsOnly, isNanomaterial, isOrder_descendant, isPreferredStructure, isPrescreen, retrieveMetric, retrieveStrucType, retrieveValue, setChemicalsOnly, setNanomaterial, setOrder_descendant
getCategory, getCondition, getFieldname, getId, getKey, getName, getPage, getPageSize, getValue, isSelected, setCondition, setFieldname, setId, setName, setPage, setPageSize, setSelected, setValue, stringify, supportsPaging, test
public QueryField()
public String getSQL() throws net.idea.modbcum.i.exceptions.AmbitException
net.idea.modbcum.i.exceptions.AmbitException
public List<net.idea.modbcum.i.query.QueryParam> getParameters() throws net.idea.modbcum.i.exceptions.AmbitException
net.idea.modbcum.i.exceptions.AmbitException
public String toString()
toString
in class AbstractQuery<Property,String,net.idea.modbcum.q.conditions.StringCondition,IStructureRecord>
Copyright © 2004–2020 Ideaconsult Ltd.. All rights reserved.