@Override
	public Query parse() {
		if(!this.prepared) {
			this.prepared = true;
			
			StringBuilder sB = new StringBuilder();
			sB.append("INSERT INTO ");
			sB.append(this.into.replace("#__", this.db.getPrefix()));
			sB.append("\n");
			
			sB.append("(");
			for(int i = 0; i < this.fields.size(); ++i) {
				if(i > 0) {
					sB.append(", ");
				}
				
				sB.append(this.fields.get(i));
			}
			sB.append(")");
			sB.append("\n");
			
			sB.append(" SELECT ");
			
			for(int i = 0; i < this.values.size(); ++i) {
				if(i > 0) {
					sB.append(" UNION ALL SELECT ");
				}
				
				Map<String, Elem> vM = this.values.get(i);
				for(int a = 0; a < this.fields.size(); ++a) {
					String f = this.fields.get(a);
					
					if(a > 0) {
						sB.append(", ");
					}
					
					if(vM.containsKey(f)) {
						Elem e = vM.get(f);
						sB.append(e.getValueType().getTextual().replace("%1", e.getValue()));
					}else{
						sB.append("''");
					}
				}
				
				sB.append("\n");
			}
			
			sB.append(";");
			
			this.query = sB.toString();
		}
		
		return this;
	}