function create($txn = true) {
		if ($txn && !($txn instanceof pq\Transaction)) {
			$txn = $this->table->getConnection()->startTransaction();
		}
		try {
			foreach ($this->rows as $row) {
				$row->create();
			}
		} catch (\Exception $e) {
			if ($txn) {
				$txn->rollback();
			}
			throw $e;
		}
		if ($txn) {
			$txn->commit();
		}
		return $this;
	}