Package org.hsqldb.persist

Examples of org.hsqldb.persist.HsqlProperties


        if (clientProperties == null) {
            if (clientPropertiesString.length() > 0) {
                HsqlProperties.delimitedArgPairsToProps(clientPropertiesString,
                        "=", ";", null);
            } else {
                clientProperties = new HsqlProperties();
            }
        }

        return clientProperties;
    }
View Full Code Here


                                + dbNumberMap.get(dbNumber));

                continue;
            }

            HsqlProperties dbURL = DatabaseURL.parseURL(path, false, false);

            if (dbURL == null) {
                printWithThread("malformed database path: " + path);

                continue;
            }

            dbAlias[i] = (String) dbNumberMap.get(dbNumber);
            dbPath[i= dbURL.getProperty("database");
            dbType[i= dbURL.getProperty("connection_type");
            dbProps[i] = dbURL;

            i++;
        }
    }
View Full Code Here

     *
     * @param args the command line arguments for the Server instance
     */
    public static void main(String[] args) {

        HsqlProperties argProps = null;

        argProps = HsqlProperties.argArrayToProps(args,
                ServerProperties.sc_key_prefix);

        String[] errors = argProps.getErrorKeys();

        if (errors.length != 0) {
            System.out.println("no value for argument:" + errors[0]);
            printHelp("server.help");

            return;
        }

        String propsPath = argProps.getProperty(ServerProperties.sc_key_props);
        String propsExtension = "";

        if (propsPath == null) {
            propsPath      = "server";
            propsExtension = ".properties";
View Full Code Here

                return Result.updateZeroResult;
            }
            case StatementTypes.SET_DATABASE_TEXT_SOURCE : {
                try {
                    String         source = (String) parameters[0];
                    HsqlProperties props  = null;

                    session.checkAdmin();

                    if (source.length() > 0) {
                        props = HsqlProperties.delimitedArgPairsToProps(source,
                                "=", ";", null);

                        if (props.getErrorKeys().length > 0) {
                            throw Error.error(ErrorCode.TEXT_TABLE_SOURCE,
                                              props.getErrorKeys()[0]);
                        }

                        session.database.logger.setDefaultTextTableProperties(
                            source, props);
                    }
View Full Code Here

            throw new RuntimeException(
                "Failed to set up in-memory database", se);
        }
        try {
            server = new Server();
            HsqlProperties properties = new HsqlProperties();
            if (System.getProperty("VERBOSE") == null) {
                server.setLogWriter(null);
                server.setErrWriter(null);
            } else {
                properties.setProperty("server.silent", "false");
                properties.setProperty("server.trace", "true");
            }
            properties.setProperty("server.database.0", "mem:test");
            properties.setProperty("server.dbname.0", "");
            properties.setProperty("server.port", AbstractTestOdbc.portString);
            server.setProperties(properties);
            server.start();
            try {
                Thread.sleep(1000);
            } catch (InterruptedException ie) {
View Full Code Here

    }

    public static void main(String[] argv) {

        TestCacheSize  test  = new TestCacheSize();
        HsqlProperties props = HsqlProperties.argArrayToProps(argv, "test");

        test.bigops   = props.getIntegerProperty("test.bigops", test.bigops);
        test.bigrows  = test.bigops;
        test.smallops = test.bigops / 8;
        test.cacheScale = props.getIntegerProperty("test.scale",
                test.cacheScale);
        test.tableType = props.getProperty("test.tabletype", test.tableType);
        test.nioMode   = props.isPropertyTrue("test.nio", test.nioMode);

        if (props.getProperty("test.dbtype", "").equals("mem")) {
            test.filepath = "mem:test";
            test.filedb   = false;
            test.shutdown = false;
        }
View Full Code Here

    HsqlProperties clientProperties;

    public HsqlProperties getClientProperties() {

        if (clientProperties == null) {
            clientProperties = new HsqlProperties();

            clientProperties.setProperty(
                HsqlDatabaseProperties.jdbc_translate_tti_types,
                database.sqlTranslateTTI);
        }
View Full Code Here

    }

    public static void main(String[] argv) {

        TestCacheSize  test  = new TestCacheSize();
        HsqlProperties props = HsqlProperties.argArrayToProps(argv, "test");

        test.bigops   = props.getIntegerProperty("test.bigops", test.bigops);
        test.bigrows  = test.bigops;
        test.smallops = test.bigops / 8;
        test.cacheScale = props.getIntegerProperty("test.scale",
                test.cacheScale);
        test.logType   = props.getProperty("test.logtype", test.logType);
        test.tableType = props.getProperty("test.tabletype", test.tableType);
        test.nioMode   = props.isPropertyTrue("test.nio", test.nioMode);

        if (props.getProperty("test.dbtype", "").equals("mem")) {
            test.filepath = "mem:test";
            test.filedb   = false;
            test.shutdown = false;
        }
View Full Code Here

                return;
            }
        }

        HsqlProperties props = HsqlProperties.argArrayToProps(arg, "server");

        webserver  = props.isPropertyTrue("server.webserver", false);
        defaulturl = webserver ? "jdbc:hsqldb:http://localhost"
                               : "jdbc:hsqldb:hsql://localhost";

        int defaultport = webserver ? 80
                                    : 9001;

        port        = props.getIntegerProperty("server.port", defaultport);
        url = props.getProperty("server.url", defaulturl + ":" + port);
        user        = props.getProperty("server.user", "sa");
        password    = props.getProperty("server.password", "");
        shutdownarg = props.getProperty("server.shutdownarg", "");

        try {
            Class.forName(driver);       // Load the driver

            Connection connection = DriverManager.getConnection(url, user,
View Full Code Here

            // add the silent property
            properties.setProperty(ServerConstants.SC_KEY_SILENT, "true");
            // set the log and error writers
            server.setLogWriter(new HsqlPrintWriter(false));
            server.setErrWriter(new HsqlPrintWriter(true));
            server.setProperties(new HsqlProperties(properties));

            // get the port
            port = server.getPort();

            // get the Address
View Full Code Here

TOP

Related Classes of org.hsqldb.persist.HsqlProperties

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.