@Override
	public String getQueryString()
	{
		if (m_fields == null || m_table == null || m_placeholders == null)
			throw new IllegalStateException("Table name or fields missing");

		if (m_where == null && m_all == false)
			throw new IllegalStateException("Must call all() to update all records");
		
		StringBuilder builder = new StringBuilder("UPDATE ");
		builder.append(QbCommonImp.protectTableName(m_table));
		builder.append(" SET ");
		
		int fieldCnt = 0;
		for (QbField field : m_fields)
		{
			builder.append(field.toString());
			builder.append(" = ?");

			if (fieldCnt != m_fields.size() - 1)
				builder.append(", ");
			fieldCnt++;
		}
		
		if (m_where != null)
			builder.append(m_where.toString());

		return builder.toString();
	}