package cn.lihongjie.coal.ipList.repository;

import cn.lihongjie.coal.base.dao.BaseRepository;
import cn.lihongjie.coal.ipList.entity.IpListEntity;

import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface IpListRepository extends BaseRepository<IpListEntity> {
    @Query(value = "select address_type from t_ip_list where address >>= cast(?1 as inet) order by address_type limit 1 ", nativeQuery = true)
    String getAddressType(String address);
}
