我有2张桌子:
table "person" with columns: person_id, person_name
table "pet" with columns: pet_id, owner_id, pet_name
person data:
1, 'John'
2, 'Jill'
3, 'Mary'
pet data:
1, 1, 'Fluffy'
2, 1, 'Buster'
3, 2, 'Doggy'
Run Code Online (Sandbox Code Playgroud)
如何写SELECT查询语句从person左连接pet上person_id = owner_id具有聚合函数,所以我的结果数据的样子:
1,[{pet_id:1,pet_name:'Fluffy'},{pet_id:2,pet_name:'Buster'}],'John'
2,[{pet_id:3,pet_name:'Doggy'}],'Jill'
3,[],'Mary'
Run Code Online (Sandbox Code Playgroud) 当用户点击外部时,尝试使用 GestureDetector 使 TextFormField 失去焦点,但我无法让它工作。onTap 永远不会触发。
class EditScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: new GestureDetector(
onTap: () {
print('this does not fire, why???????????');
// this is my attempt to unfocus textformfield when click away
FocusScope.of(context).requestFocus(new FocusNode());
},
child: SingleChildScrollView(
child: Column(
children: <Widget>[
TextFormField(
maxLines: null,
),
],
),
),
),
);
}
}
Run Code Online (Sandbox Code Playgroud) 我需要一个任何语言的脚本来大写文件中每个单词的第一个字母.
感谢所有的答案.
Stackoverflow岩石!