@Override
	public String toSql(String tblName,List<String> headers,List<String> columns,
			HashMap<String,ForeignKey> foreignKeys) {
		StringBuilder builder = new StringBuilder();
		builder.append("INSERT INTO ");
		builder.append(tblName);
		builder.append("(");
		builder.append(horizontalKeyName);
		builder.append(",");
		builder.append(verticalKeyName);
		builder.append(",");
		builder.append(dataKeyName);
		builder.append(") VALUES ");
		String verticalKey = columns.get(0);
		for(int i = 1 ; i < headers.size() ; i++){
			String header = headers.get(i);
			String data = columns.get(i);
			
			builder.append("(");
			//header insert, check if we need to do a nested select or direct value
			ForeignKey key_header = foreignKeys.get(this.horizontalKeyName);
			ForeignKey key_vertical = foreignKeys.get(this.verticalKeyName);
			ForeignKey key_data = foreignKeys.get(this.dataKeyName);
			
			if(key_header == null){
				builder.append("'");
				builder.append(header);
				builder.append("'");
			}else{
				builder.append(key_header.toSQL(header));
			}
			builder.append(",");
			if(key_vertical == null){
				builder.append("'");
				builder.append(verticalKey);
				builder.append("'");
			}else{
				builder.append(key_vertical.toSQL(header));
			}
			builder.append(",");
			if(key_data == null){
				builder.append("'");
				builder.append(data);
				builder.append("'");
			}else{
				builder.append(key_data.toSQL(data));
			}
			
			builder.append(")");
			if(i < headers.size()-1){
				builder.append(",");
			}
		}
		builder.append(";");
		return builder.toString();
	}