code: @Override
  	public synchronized RecordTag insert(long historyId, String tag) throws DatabaseException {
      	SqlPreparedStatementWrapper psInsertTag = null;
          try {
          	psInsertTag = DbSQL.getSingleton().getPreparedStatement("tag.ps.insert");
  			psInsertTag.getPs().setLong(1, historyId);
  			psInsertTag.getPs().setString(2, tag);
  			psInsertTag.getPs().executeUpdate();
  			
  			try (ResultSet rs = psInsertTag.getLastInsertedId()) {
  				rs.next();
  				long id = rs.getLong(1);
  				return read(id);
  			}
  		} catch (SQLException e) {
  			throw new DatabaseException(e);
  		} finally {
  			DbSQL.getSingleton().releasePreparedStatement(psInsertTag);
  		}
      }
docs: /* (non-Javadoc)
  @see org.parosproxy.paros.db.paros.TableTag#insert(long, java.lang.String)