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

jaskell.sql.Do Maven / Gradle / Ivy

Go to download

This is a utils library for java 8 project. It include parsec combinators and sql generators library.

There is a newer version: 2.9.2
Show newest version
package jaskell.sql;

import jaskell.script.Directive;
import jaskell.script.Parameter;

import java.util.List;

public class Do implements Directive {
    Directive _prefix;

    @Override
    public String script() {
        return String.format("%s DO", _prefix.script());
    }

    @Override
    public List> parameters() {
        return _prefix.parameters();
    }

    public Nothing nothing(){
        Nothing re = new Nothing();
        re._prefix = this;
        return re;
    }

    public Update update(){
        Update re = new Update();
        re._prefix = this;
        return re;
    }

    public static class Update implements Directive {
        Directive _prefix;

        @Override
        public String script() {
            return String.format("%s UPDATE", _prefix.script());
        }

        @Override
        public List> parameters() {
            return _prefix.parameters();
        }

        public jaskell.sql.Update.Set set(String field, Directive value){
            jaskell.sql.Update.Set re = new jaskell.sql.Update.Set(field, value);
            re._prefix = this;
            return re;
        }

        public jaskell.sql.Update.Set set(Directive field, Directive value){
            jaskell.sql.Update.Set re = new jaskell.sql.Update.Set(field, value);
            re._prefix = this;
            return re;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy