All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.base4j.mybatis.sql.template.ftl.sqlite.ftl Maven / Gradle / Ivy

There is a newer version: 1.3.0
Show newest version





    <#if cache?? && cache == "MYBATIS">
        
    

    
    <#list entityClassColumns as column>
        <#if column.id>
            jdbcType="${column.jdbcTypeName}" property="${column.property}"/>
        
    
    <#list entityClassColumns as column>
        <#if !column.id>
            jdbcType="${column.jdbcTypeName}" property="${column.property}"/>
        
    
    <#list mybatisAssociations as association>
        
            <#list association.resultMap as result>
                <#if result.id>
                    jdbcType="${result.jdbcTypeName}" property="${result.property}"/>
                
            
            <#list association.resultMap as result>
                <#if !result.id>
                    jdbcType="${result.jdbcTypeName}" property="${result.property}"/>
                
            
        
    
    <#list mybatisConnections as connection>
        
            <#list connection.resultMap as result>
                <#if result.id>
                    jdbcType="${result.jdbcTypeName}" property="${result.property}"/>
                
            
            <#list connection.resultMap as result>
                <#if !result.id>
                    jdbcType="${result.jdbcTypeName}" property="${result.property}"/>
                
            
        
    
    

    
        insert into ${name}
        
        <#list entityClassColumns as column>
            <#if column.id>
                ${column.column},
            <#else >
            
                 ${column.column},
            
            
        
        
        
        <#list entityClassColumns as column>
            <#if column.id>
            
            ${r'#{'}${column.property}<#if column.jdbcTypeName??>, jdbcType=${column.jdbcTypeName}${r'}'},
            
            
            null,
            
            <#else >
            
            ${r'#{'}${column.property}<#if column.jdbcTypeName??>, jdbcType=${column.jdbcTypeName}${r'}'},
            
            
        
        
    

    
        update ${name}
        
        <#list entityClassColumns as column>
            <#if !column.id>
            ${column.column} = ${r'#{'}${column.property}<#if column.jdbcTypeName??>, jdbcType=${column.jdbcTypeName}${r'}'},
            
        
        
        
        <#list entityClassPKColumns as column>
        ${column.column} = ${r'#{'}${column.property}<#if column.jdbcTypeName??>, jdbcType=${column.jdbcTypeName}${r'}'} and
        
        
    

    
        update ${name}
        
        <#list entityClassColumns as column>
            <#if !column.id>
                
                ${column.column} = ${r'#{'}${column.property}<#if column.jdbcTypeName??>, jdbcType=${column.jdbcTypeName}${r'}'},
                
            
        
        
        
        <#list entityClassPKColumns as column>
        ${column.column} = ${r'#{'}${column.property}<#if column.jdbcTypeName??>, jdbcType=${column.jdbcTypeName}${r'}'} and
        
        
    

    
        update ${name}
        
        <#list entityClassColumns as column>
            <#if !column.id>
            ${column.column} = ${r'#{record.'}${column.property}<#if column.jdbcTypeName??>,jdbcType=${column.jdbcTypeName}${r'}'},
            
        
        
        
            
                
                    
                        
                            
                                
                                    
                                        and ${r'${criterion.condition}'}
                                    
                                    
                                        and ${r'${criterion.condition} #{criterion.value}'}
                                    
                                    
                                        and ${r'${criterion.condition} #{criterion.value} and #{criterion.secondValue}'}
                                    
                                    
                                        and ${r'${criterion.condition}'}
                                        
                                        ${r'#{listItem}'}
                                        
                                    
                                
                            
                        
                    
                    
                        1 = -1
                    
                
            
        
        
            
                1 = -1
            
        

    

    
        
            update ${name}
            
            <#list entityClassColumns as column>
                
                ${column.column} = ${r'#{record.'}${column.property}<#if column.jdbcTypeName??>, jdbcType=${column.jdbcTypeName}${r'}'},
                
            
            
            
                
                    
                        
                            
                                
                                    
                                        
                                            and ${r'${criterion.condition}'}
                                        
                                        
                                            and ${r'${criterion.condition} #{criterion.value}'}
                                        
                                        
                                            and ${r'${criterion.condition} #{criterion.value} and #{criterion.secondValue}'}
                                        
                                        
                                            and ${r'${criterion.condition}'}
                                            
                                            ${r'#{listItem}'}
                                            
                                        
                                    
                                
                            
                        
                        
                            1 = -1
                        
                    
                
            
            
                
                    1 = -1
                
            
        
    

    
        delete from ${name}
        
        <#list entityClassPKColumns as column>
        ${column.column} = ${r'#{'}${column.property}<#if column.jdbcTypeName??>, jdbcType=${column.jdbcTypeName}${r'}'} and
        
        
    

    
        delete from ${name}
        
            
                
                    
                    
                
            
        
        
            
                1 = -1
            
        
    

    

    

    

    

    

    

    

    
    
        
            1 = -1
        
    

    
    
        
            
                
                    
                        
                            and ${r'${criterion.condition}'}
                        
                        
                            and ${name}.${r'${criterion.condition} #{criterion.value}'}
                        
                        
                            and ${name}.${r'${criterion.condition} #{criterion.value} and #{criterion.secondValue}'}
                        
                        
                            and ${name}.${r'${criterion.condition}'}
                            
                            ${r'#{listItem}'}
                            
                        
                    
                
            
        
    





© 2015 - 2024 Weber Informatics LLC | Privacy Policy