# queryfn tests

FEATURE: queryfn-first
background:
  type Flight struct {id int unique, wid int optional }  end
thenType: struct

---
title: first
given:
  insert Flight {id: 55, wid: 4 }
  insert Flight {id: 56, wid: 3 }
when:
  let x = Flight[true].first()
then:
value:a:Flight {
 vid:55
 vwid:4
}

---
title: first empty
given:
  insert Flight {id: 55, wid: 4 }
  insert Flight {id: 56, wid: 3 }
when:
  let x = Flight[id=100].first()
then:
null

