<commit_before>package fi.nls.oskari.service.capabilities;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * Created by SMAKINEN on 24.8.2015.
 */
public interface CapabilitiesMapper {

    @Select("SELECT id, layertype, url, data, created, updated, version" +
            " FROM oskari_capabilities_cache" +
            " WHERE url = #{url} AND layertype = #{type} AND" +
            " (version = #{version} OR version is null)" +
            " ORDER BY version ASC")<commit_msg>Limit capabilities fetch to one result<commit_after>package fi.nls.oskari.service.capabilities;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * Created by SMAKINEN on 24.8.2015.
 */
public interface CapabilitiesMapper {

    @Select("SELECT id, layertype, url, data, created, updated, version" +
            " FROM oskari_capabilities_cache" +
            " WHERE url = #{url} AND layertype = #{type} AND" +
            " (version = #{version} OR version is null)" +
            " ORDER BY version ASC LIMIT 1")
{'fraction_non_alphanumeric': 0.1182033096926714, 'fraction_numerical': 0.01182033096926714, 'mean_word_length': 3.3793103448275863, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6276235', 'n_tokens_mistral': 393, 'n_tokens_neox': 380, 'n_words': 96}