# queryfn tests

FEATURE: queryfn-exist
background:
  type Flight struct {id int unique, wid int optional }  end
thenType: struct
#value:a:int:2
---
title: count
given:
  insert Flight {id: 55, wid: 4 }
  insert Flight {id: 56, wid: 3 }
when:
  let x = Flight[true].exist()
then:
value:a:boolean:true

---
title: empty
#note. exist returns false when query returns nothing. TODO: is this what we want to do?
given:
  insert Flight {id: 55, wid: 4 }
  insert Flight {id: 56, wid: 3 }
when:
  let x = Flight[id=100].exist()
then:
value:a:boolean:false
