zserio.extension.python.PythonSqlIndirectExpressionFormattingPolicy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zserio Show documentation
Show all versions of zserio Show documentation
Zserio Serialization Framework Compiler
The newest version!
package zserio.extension.python;
import zserio.ast.Field;
/**
* A special formatting policy to be used in generated SQL tables which need indirect references.
*/
final class PythonSqlIndirectExpressionFormattingPolicy extends PythonExpressionFormattingPolicy
{
public PythonSqlIndirectExpressionFormattingPolicy(
TemplateDataContext context, ImportCollector importCollector)
{
super(context, importCollector);
}
@Override
protected void formatFieldAccessor(
StringBuilder result, boolean isFirstInDot, Field field, boolean isSetter)
{
if (isFirstInDot)
result.append(AccessorNameFormatter.getSqlColumnName(field));
else
super.formatFieldAccessor(result, false, field, isSetter);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy