Esempio n. 1
0
 public async Task <IEnumerable <PKMember> > GetConflictingProxies(PKSystem system, ProxyTag tag)
 {
     using (var conn = await _conn.Obtain())
         // return await conn.QueryAsync<PKMember>("select * from (select *, (unnest(proxy_tags)).prefix as prefix, (unnest(proxy_tags)).suffix as suffix from members where system = @System) as _ where prefix ilike @Prefix and suffix ilike @Suffix", new
         // {
         //     System = system.Id,
         //     Prefix = tag.Prefix.Replace("%", "\\%") + "%",
         //     Suffix = "%" + tag.Suffix.Replace("%", "\\%")
         // });
         return(await conn.QueryAsync <PKMember>("select * from (select *, (unnest(proxy_tags)).prefix as prefix, (unnest(proxy_tags)).suffix as suffix from members where system = @System) as _ where prefix = @Prefix and suffix = @Suffix", new
         {
             System = system.Id,
             Prefix = tag.Prefix,
             Suffix = tag.Suffix
         }));
 }
Esempio n. 2
0
 public bool Equals(ProxyTag other) => Prefix == other.Prefix && Suffix == other.Suffix;