我有一个名为contacts的表。我想获取以下联系人表中的所有记录where person_id = 1
。
class Contacts extends Table {
IntColumn get id => integer().autoIncrement()();
TextColumn get contact_type => text().withLength(min: 1, max: 50)();
TextColumn get contact => text().withLength(min: 1, max: 100)();
IntColumn get person_id =>
integer().customConstraint('REFERENCES persons(id)')();
DateTimeColumn get created => dateTime()();
DateTimeColumn get updated => dateTime()();
}
如何使用moor_flutter执行select * from contacts where person_id = 1
?谢谢,用爱发表。