Package org.hsqldb.scriptio

Examples of org.hsqldb.scriptio.ScriptWriterText


        Crypto crypto = database.logger.getCrypto();

        try {
            if (crypto == null) {
                dbLogWriter = new ScriptWriterText(database, logFileName,
                                                   false, false, false);
            } else {
                dbLogWriter = new ScriptWriterEncode(database, logFileName,
                                                     crypto);
            }
View Full Code Here


        ScriptWriterBase scw;
        Crypto           crypto = database.logger.getCrypto();

        if (crypto == null) {
            scw = new ScriptWriterText(database, scriptFileName + ".new",
                                       full, true, false);
        } else {
            scw = new ScriptWriterEncode(database, scriptFileName + ".new",
                                         full, crypto);
        }
View Full Code Here

                } catch (HsqlException e) {
                    return Result.newErrorResult(e, sql);
                }
            }
            case StatementTypes.DATABASE_SCRIPT : {
                ScriptWriterText dsw  = null;
                String           name = (String) parameters[0];

                if (name == null) {
                    return session.database.getScript(false);
                } else {
                    try {
                        dsw = new ScriptWriterText(session.database, name,
                                                   true, true, true);

                        dsw.writeAll();
                        dsw.close();
                    } catch (HsqlException e) {
                        return Result.newErrorResult(e, sql);
                    }

                    return Result.updateZeroResult;
View Full Code Here

     * @throws HsqlException
     */
    private Result processScript() throws IOException, HsqlException {

        String           token = tokenizer.getString();
        ScriptWriterText dsw   = null;

        session.checkAdmin();

        try {
            if (tokenizer.wasValue()) {
                if (tokenizer.getType() != Types.VARCHAR) {
                    throw Trace.error(Trace.INVALID_IDENTIFIER);
                }

                dsw = new ScriptWriterText(database, token, true, true, true);

                dsw.writeAll();

                return new Result(ResultConstants.UPDATECOUNT);
            } else {
                tokenizer.back();

                return DatabaseScript.getScript(database, false);
            }
        } finally {
            if (dsw != null) {
                dsw.close();
            }
        }
    }
View Full Code Here

                } catch (HsqlException e) {
                    return Result.newErrorResult(e, sql);
                }
            }
            case StatementTypes.DATABASE_SCRIPT : {
                ScriptWriterText dsw  = null;
                String           name = (String) parameters[0];

                try {
                    session.checkAdmin();

                    if (name == null) {
                        return session.database.getScript(false);
                    } else {
                        dsw = new ScriptWriterText(session.database, name,
                                                   true, true, true);

                        dsw.writeAll();
                        dsw.close();

                        return Result.updateZeroResult;
                    }
                } catch (HsqlException e) {
                    return Result.newErrorResult(e, sql);
View Full Code Here

                }

                path = path + "/" + new File(database.getPath()).getName();
                scriptName = path + scriptFileExtension;

                ScriptWriterText dsw = new ScriptWriterText(database,
                    scriptName, true, true, true);

                dsw.writeAll();
                dsw.close();

                backup = new DbBackup(archiveFile, path, true);

                backup.write();
            } else {
View Full Code Here

        Crypto crypto = database.logger.getCrypto();

        try {
            if (crypto == null) {
                dbLogWriter = new ScriptWriterText(database, logFileName,
                                                   false, false, false);
            } else {
                dbLogWriter = new ScriptWriterEncode(database, logFileName,
                                                     crypto);
            }
View Full Code Here

        Crypto           crypto = database.logger.getCrypto();

        if (crypto == null) {
            boolean compressed = database.logger.propScriptFormat == 3;

            scw = new ScriptWriterText(database,
                                       scriptFileName
                                       + Logger.newFileExtension, full,
                                           compressed);
        } else {
            scw = new ScriptWriterEncode(database,
View Full Code Here

                } catch (HsqlException e) {
                    return Result.newErrorResult(e, sql);
                }
            }
            case StatementTypes.DATABASE_SCRIPT : {
                ScriptWriterText dsw  = null;
                String           name = (String) parameters[0];

                try {
                    session.checkAdmin();

                    if (name == null) {
                        return session.database.getScript(false);
                    } else {
                        dsw = new ScriptWriterText(session.database, name,
                                                   true, true, true);

                        dsw.writeAll();
                        dsw.close();

                        return Result.updateZeroResult;
                    }
                } catch (HsqlException e) {
                    return Result.newErrorResult(e, sql);
View Full Code Here

                }

                path = path + "/" + new File(database.getPath()).getName();
                scriptName = path + scriptFileExtension;

                ScriptWriterText dsw = new ScriptWriterText(database,
                    scriptName, true, true, true);

                dsw.writeAll();
                dsw.close();

                backup = new DbBackup(archiveFile, path, true);

                backup.write();
            } else {
View Full Code Here

TOP

Related Classes of org.hsqldb.scriptio.ScriptWriterText

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.