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

db.sql.api.cmd.executor.IInsert Maven / Gradle / Ivy

There is a newer version: 1.7.6-RC2
Show newest version
package db.sql.api.cmd.executor;

import db.sql.api.Getter;
import db.sql.api.cmd.basic.ITable;
import db.sql.api.cmd.basic.ITableField;
import db.sql.api.cmd.struct.insert.IInsertFields;
import db.sql.api.cmd.struct.insert.IInsertSelect;
import db.sql.api.cmd.struct.insert.IInsertTable;
import db.sql.api.cmd.struct.insert.IInsertValues;

import java.util.List;
import java.util.function.Consumer;

public interface IInsert,
        TABLE_FIELD extends ITableField,
        V,
        INSERT_TABLE extends IInsertTable,
        INSERT_FIELD extends IInsertFields,
        INSERT_VALUE extends IInsertValues,
        INSERT_SELECT extends IInsertSelect
        >
        extends IExecutor {


    INSERT_TABLE $insert(TABLE table);

    INSERT_FIELD $field(TABLE_FIELD... fields);

    INSERT_FIELD $field(List fields);

    INSERT_VALUE $values(List values);

    INSERT_SELECT $fromSelect(IQuery query);


    default SELF insert(TABLE table) {
        $insert(table);
        return (SELF) this;
    }

    SELF insert(Class entity);

    SELF insert(Class entity, Consumer
consumer); SELF insertIgnore(); default SELF field(TABLE_FIELD... fields) { $field(fields); return (SELF) this; } default SELF field(List fields) { $field(fields); return (SELF) this; } SELF field(Getter... fields); SELF values(List values); SELF fromSelect(IQuery query); INSERT_TABLE getInsertTable(); INSERT_FIELD getInsertFields(); INSERT_VALUE getInsertValues(); }