// Path: library/src/main/java/org/mariotaku/sqliteqb/library/Columns.java
// public static class Column extends AbsColumn {
// 
//     private final String sql, alias;
// 
//     public Column(final String sql) {
//         this(sql, null);
//     }
// 
//     public Column(final String sql, final String alias) {
//         this.sql = sql;
//         this.alias = alias;
//     }
// 
//     public Column(final SQLLang sql, final String alias) {
//         this.sql = sql.getSQL();
//         this.alias = alias;
//     }
// 
//     public Column(final Table table, final String columnName) {
//         this(table, columnName, null);
//     }
// 
//     public Column(final Table table, final String columnName, final String alias) {
//         this(table.getSQL() + "." + columnName, alias);
//     }
// 
//     @Override
//     public String getSQL() {
//         if (alias == null) return sql;
//         return sql + " AS " + alias;
//     }
// }


import org.mariotaku.sqliteqb.library.Columns.Column;
/*
 * Copyright (c) 2015 mariotaku
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.mariotaku.sqliteqb.library;


public class Expression implements SQLLang {
    private final String expr;

    public Expression(final String expr) {
        this.expr = expr;
    }

    public Expression(SQLLang lang) {
        this(lang.getSQL());
    }

    public static Expression and(final Expression... expressions) {
        return new Expression(toExpr(expressions, "AND"));
    }

// Path: library/src/main/java/org/mariotaku/sqliteqb/library/Columns.java
// public static class Column extends AbsColumn {
// 
//     private final String sql, alias;
// 
//     public Column(final String sql) {
//         this(sql, null);
//     }
// 
//     public Column(final String sql, final String alias) {
//         this.sql = sql;
//         this.alias = alias;
//     }
// 
//     public Column(final SQLLang sql, final String alias) {
//         this.sql = sql.getSQL();
//         this.alias = alias;
//     }
// 
//     public Column(final Table table, final String columnName) {
//         this(table, columnName, null);
//     }
// 
//     public Column(final Table table, final String columnName, final String alias) {
//         this(table.getSQL() + "." + columnName, alias);
//     }
// 
//     @Override
//     public String getSQL() {
//         if (alias == null) return sql;
//         return sql + " AS " + alias;
//     }
// }


// Path: library/src/main/java/org/mariotaku/sqliteqb/library/Expression.java
import org.mariotaku.sqliteqb.library.Columns.Column;

/*
 * Copyright (c) 2015 mariotaku
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.mariotaku.sqliteqb.library;


public class Expression implements SQLLang {
    private final String expr;

    public Expression(final String expr) {
        this.expr = expr;
    }

    public Expression(SQLLang lang) {
        this(lang.getSQL());
    }

    public static Expression and(final Expression... expressions) {
        return new Expression(toExpr(expressions, "AND"));
    }

    public static Expression equals(final Column l, final Column r) {