java/sql-dk/src/info/globalcode/sql/dk/formatting/Formatter.java
author František Kučera <franta-hg@frantovo.cz>
Mon, 23 Dec 2013 16:19:21 +0100
branchv_0
changeset 41 514df5061f59
parent 34 9335cf31c0f2
child 91 43e8d52091d5
permissions -rw-r--r--
No special formatting for generated keys. Use 'INSERT … RETURNING id' or 'INSERT … RETURNING *' to get generated keys.
franta-hg@22
     1
/**
franta-hg@22
     2
 * SQL-DK
franta-hg@22
     3
 * Copyright © 2013 František Kučera (frantovo.cz)
franta-hg@22
     4
 *
franta-hg@22
     5
 * This program is free software: you can redistribute it and/or modify
franta-hg@22
     6
 * it under the terms of the GNU General Public License as published by
franta-hg@22
     7
 * the Free Software Foundation, either version 3 of the License, or
franta-hg@22
     8
 * (at your option) any later version.
franta-hg@22
     9
 *
franta-hg@22
    10
 * This program is distributed in the hope that it will be useful,
franta-hg@22
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
franta-hg@22
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
franta-hg@22
    13
 * GNU General Public License for more details.
franta-hg@22
    14
 *
franta-hg@22
    15
 * You should have received a copy of the GNU General Public License
franta-hg@22
    16
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
franta-hg@22
    17
 */
franta-hg@22
    18
package info.globalcode.sql.dk.formatting;
franta-hg@22
    19
franta-hg@22
    20
import info.globalcode.sql.dk.Parameter;
franta-hg@29
    21
import info.globalcode.sql.dk.configuration.DatabaseDefinition;
franta-hg@22
    22
import java.util.List;
franta-hg@22
    23
franta-hg@22
    24
/**
franta-hg@22
    25
 *
franta-hg@22
    26
 * @author Ing. František Kučera (frantovo.cz)
franta-hg@22
    27
 */
franta-hg@22
    28
public interface Formatter {
franta-hg@22
    29
franta-hg@29
    30
	void writeStartDatabase(DatabaseDefinition databaseDefinition);
franta-hg@22
    31
franta-hg@22
    32
	void writeEndDatabase();
franta-hg@22
    33
franta-hg@22
    34
	void writeStartResultSet();
franta-hg@22
    35
franta-hg@22
    36
	void writeEndResultSet();
franta-hg@22
    37
franta-hg@22
    38
	void writeQuery(String sql);
franta-hg@22
    39
franta-hg@34
    40
	void writeParameters(List<? extends Parameter> parameters);
franta-hg@22
    41
franta-hg@22
    42
	void writeColumnsHeader(ColumnsHeader header);
franta-hg@22
    43
franta-hg@22
    44
	void writeStartRow();
franta-hg@22
    45
franta-hg@22
    46
	void writeColumnValue(Object value);
franta-hg@22
    47
franta-hg@22
    48
	void writeEndRow();
franta-hg@22
    49
franta-hg@22
    50
	void writeStartUpdatesResult();
franta-hg@22
    51
franta-hg@22
    52
	void writeUpdatedRowsCount(int updatedRowsCount);
franta-hg@22
    53
franta-hg@22
    54
	void writeEndUpdatesResult();
franta-hg@22
    55
}