title: Composite types with pg-promise
body: <p>Here is an example code:</p>
  
  <pre><code>battle.heroes = [{ id: hero.id, name: hero.name }]; //This is my array I want to insert
  await db.one('INSERT INTO battles(mode, params, heroes) VALUES(${mode}, ${params}, ${heroes}) RETURNING id', {
      mode: battle.mode,
      params: battle.params,
      heroes: battle.heroes,
  });
  </code></pre>
  
  <p>PostgreSQL type 'hero_info':</p>
  
  <pre><code>id int4
  name varchar
  </code></pre>