def _get_fields(self, table_name, **kwargs):
ret = {}<EOL>query_str = []<EOL>query_args = ['<STR_LIT:f>', table_name]<EOL>query_str.append('<STR_LIT>')<EOL>query_str.append('<STR_LIT:U+002CU+0020>'.join([<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>]))<EOL>query_str.append('<STR_LIT>')<EOL>query_str.append('<STR_LIT>')<EOL>query_str.append('<STR_LIT>')<EOL>query_str.append('<STR_LIT>')<EOL>query_str.append('<STR_LIT>')<EOL>query_str.append('<STR_LIT>')<EOL>query_str.append('<STR_LIT>'.format(self.val_placeholder))<EOL>query_str.append('<STR_LIT>')<EOL>query_str.append('<STR_LIT>')<EOL>query_str.append('<STR_LIT>'.format(self.val_placeholder))<EOL>query_str.append('<STR_LIT>')<EOL>query_str.append('<STR_LIT>')<EOL>query_str.append('<STR_LIT>')<EOL>query_str = os.linesep.join(query_str)<EOL>fields = self.query(query_str, *query_args, **kwargs)<EOL>pg_types = {<EOL>"<STR_LIT>": float,<EOL>"<STR_LIT>": datetime.datetime,<EOL>"<STR_LIT>": int,<EOL>"<STR_LIT>": int,<EOL>"<STR_LIT>": long,<EOL>"<STR_LIT>": decimal.Decimal,<EOL>"<STR_LIT:text>": str,<EOL>"<STR_LIT>": str,<EOL>"<STR_LIT>": str,<EOL>"<STR_LIT:bool>": bool,<EOL>"<STR_LIT:date>": datetime.date,<EOL>"<STR_LIT>": bytearray,<EOL>}<EOL>for row in fields:<EOL><INDENT>field = {<EOL>"<STR_LIT:name>": row["<STR_LIT>"],<EOL>"<STR_LIT>": pg_types[row["<STR_LIT>"]],<EOL>"<STR_LIT>": row["<STR_LIT>"],<EOL>"<STR_LIT>": bool(row["<STR_LIT>"]),<EOL>}<EOL>if row["<STR_LIT>"]:<EOL><INDENT>field["<STR_LIT>"] = row["<STR_LIT>"]<EOL>field["<STR_LIT>"] = row["<STR_LIT>"]<EOL><DEDENT>ret[field["<STR_LIT:name>"]] = field<EOL><DEDENT>return ret<EOL>
return all the fields for the given schema