Class SqlFormatter

    • Constructor Detail

      • SqlFormatter

        public SqlFormatter​(io.github.mmm.property.criteria.CriteriaSqlFormatter criteriaFormatter)
        The constructor.
        Parameters:
        criteriaFormatter - the CriteriaSqlFormatter used to format criteria fragments to SQL.
    • Method Detail

      • getCriteriaFormatter

        public io.github.mmm.property.criteria.CriteriaSqlFormatter getCriteriaFormatter()
        Returns:
        the CriteriaSqlFormatter used to format criteria fragments to SQL.
      • write

        protected void write​(String text)
        Parameters:
        text - the SQL to append.
      • out

        protected io.github.mmm.base.io.AppendableWriter out()
        Returns:
        the AppendableWriter wrapping the Appendable to write to.
      • isSelectAllByAlias

        public boolean isSelectAllByAlias()
        Returns:
        true if a Select of all properties should happen via alias, false otherwise (to simply use *). The default is false. Override to change. E.g. in JPQL you would write "SELECT a FROM Entity a ..." whereas in plain SQL you would write "SELECT * FROM Entity ..."
      • setSelectAllByAlias

        public void setSelectAllByAlias​(boolean selectAllByAlias)
        Parameters:
        selectAllByAlias - new value of isSelectAllByAlias().
      • isUseAsBeforeAlias

        public boolean isUseAsBeforeAlias()
        Returns:
        true to use the AS keyword before an alias (e.g. "FROM Entity AS e"), false otherwise.
      • setUseAsbeforeAlias

        public void setUseAsbeforeAlias​(boolean useAsbeforeAlias)
        Parameters:
        useAsbeforeAlias - new value of isUseAsBeforeAlias().
      • onSelectAll

        protected void onSelectAll​(SelectFrom<?> selectFrom)
        Parameters:
        selectFrom - the SelectFrom giving access to the alias.