3 ms·
In today's C++ you can precompute data structures at compile time with constexpr. Also slightly off-topic, but in SQL you can insert many tuples in one stateme
by quazar 7y ago
In today's C++ you can precompute data structures at compile time with constexpr.
Also slightly off-topic, but in SQL you can insert many tuples in one statement like this
insert into people (name) values ('Tony'), ('Bob'), ('Mary');
- smitty1e 7y agoFor clarity's sake, keeping to a single language in a block of code makes sense. If willing to live on the edge, one can do some serious code generating in the SELECT clause of an SQL statement. Mwahahahaha.
- emmelaich 7y agoNice. Works in sqlite3 - but it doesn’t like the parens around the tablename. $ cat multiple-insert.sql create table users (first, last); insert into users values ('fred','bloggs'), ('mary', ‘contrary'); select * from users; $ sqlite3 < multiple-insert.sql fred|bloggs mary|contrary