need a way to insert multiple rows into sql table, and
return all inserted primary key idswith one sql query.
You can't even do that in pure sql, or at least mysql/mariadb and probably some others. At least not efficiently and accurately. Google "mysql bulk insert ids" or whatever db you're using. They usually only return the single most recently inserted id.