Examples of XStatement


Examples of com.sun.star.sdbc.XStatement

    */
    public void addRowToTestTable(XConnection con, String table, Object[] values,
        int streamLength)
        throws com.sun.star.sdbc.SQLException {

        XStatement stat = con.createStatement() ;

        XResultSet set = stat.executeQuery("SELECT * FROM " + table) ;

        XResultSetUpdate updt = (XResultSetUpdate) UnoRuntime.queryInterface
            (XResultSetUpdate.class, set) ;

        XRowUpdate rowUpdt = (XRowUpdate) UnoRuntime.queryInterface
View Full Code Here

Examples of com.sun.star.sdbc.XStatement

    // Currently doesn't work because of bugs 85509, 85510

    public int deleteAllRows(XConnection con, String table)
        throws com.sun.star.sdbc.SQLException {

        XStatement stat = con.createStatement() ;

        XResultSet set = stat.executeQuery("SELECT * FROM " + table) ;

        XResultSetUpdate updt = (XResultSetUpdate) UnoRuntime.queryInterface
            (XResultSetUpdate.class, set) ;

        int count = 0 ;
View Full Code Here

Examples of com.sun.star.sdbc.XStatement

    */
    public void addRowToTestTable(XConnection con, String table, Object[] values,
        int streamLength)
        throws com.sun.star.sdbc.SQLException {

        XStatement stat = con.createStatement() ;

        XResultSet set = stat.executeQuery("SELECT * FROM " + table) ;

        XResultSetUpdate updt = (XResultSetUpdate) UnoRuntime.queryInterface
            (XResultSetUpdate.class, set) ;

        XRowUpdate rowUpdt = (XRowUpdate) UnoRuntime.queryInterface
View Full Code Here

Examples of com.sun.star.sdbc.XStatement

    /** executes the given SQL statement via the defaultConnection
     */
    public void executeSQL( String statementString ) throws SQLException
    {
        XStatement statement = defaultConnection().createStatement();
        statement.execute( statementString );
    }
View Full Code Here

Examples of com.sun.star.sdbc.XStatement

    // --------------------------------------------------------------------------------------------------------
    public void checkStatementQiQSupport()
    {
        try
        {
            XStatement statement = m_database.getConnection().createStatement();
            XResultSet resultSet = statement.executeQuery( "SELECT * FROM \"query products\"" );
        }
        catch( SQLException e )
        {
            assure( "SDB level statements do not allow for queries in queries", false );
        }
View Full Code Here

Examples of com.sun.star.sdbc.XStatement

        isolConnection = (XIsolatedConnection) UnoRuntime.queryInterface(
                XIsolatedConnection.class,
                oDBSource);
       
        XConnection connection = null;
        XStatement statement = null;
       
        final String tbl_name1 = "tst_table1";
        final String tbl_name2 = "tst_table2";
        final String col_name1 = "id1";
        final String col_name2 = "id2";
       
        try
        {
            connection = isolConnection.getIsolatedConnection(user, password);
            statement = connection.createStatement();
            statement.executeUpdate("drop table if exists " + tbl_name1);
            statement.executeUpdate("drop table if exists " + tbl_name2);
            statement.executeUpdate("create table " + tbl_name1 + " (" +
                    col_name1 + " int)");
            statement.executeUpdate("create table " + tbl_name2 + " (" +
                    col_name2 + " int)");
        }
        catch (com.sun.star.sdbc.SQLException e)
        {
            try
            {
                shortWait();
                connection = isolConnection.getIsolatedConnection(user,
                        password);
                statement = connection.createStatement();
                statement.executeUpdate("drop table if exists " + tbl_name1);
                statement.executeUpdate("drop table if exists " + tbl_name2);
                statement.executeUpdate("create table " + tbl_name1 + " (" +
                        col_name1 + " int)");
                statement.executeUpdate("create table " + tbl_name2 + " (" +
                        col_name2 + " int)");
            }
            catch (com.sun.star.sdbc.SQLException e2)
            {
                e2.printStackTrace(log);
View Full Code Here

Examples of xscript.compiler.XTree.XStatement

        break;
      prefix.add(0, operator);
    }
    if(prefix.isEmpty())
      prefix = null;
    XStatement statement = makeNumRead(true);
    List<XOperator> suffix = new ArrayList<XOperator>();
    while(isOperator(token.kind)){
      operator = readOperator(Type.SUFFIX);
      if(operator==XOperator.NONE)
        break;
      suffix.add(operator);
    }
    if(suffix.isEmpty())
      suffix = null;
    if(prefix == null && suffix == null){
      endLineBlock();
    }else{
      statement = new XOperatorPrefixSuffix(endLineBlock(), prefix, statement, suffix);
    }
    while(token.kind==XTokenKind.LGROUP || token.kind==XTokenKind.LINDEX){
      startLineBlock();
      startLineBlock();
      if(token.kind==XTokenKind.LGROUP){
        List<XStatement> list = makeMethodCallParamList();
        statement = new XMethodCall(endLineBlock(), statement, list);
      }else if(token.kind==XTokenKind.LINDEX){
        nextToken();
        XStatement index = makeInnerStatement();
        expected(XTokenKind.RINDEX);
        statement = new XIndex(endLineBlock(), statement, index);
      }
      suffix = new ArrayList<XOperator>();
      while(isOperator(token.kind)){
View Full Code Here

Examples of xscript.compiler.XTree.XStatement

      return new XOperatorStatement(line, left, o, right);
    }
  }
 
  public XStatement makeInnerStatement(){
    XStatement statement = makeStatementWithSuffixAndPrefix();
    XStatement between = null;
    while(isOperator(token.kind)){
      startLineBlock();
      between = null;
      XOperator o = readOperator(Type.INFIX);
      if(o==XOperator.IF){
View Full Code Here

Examples of xscript.compiler.XTree.XStatement

    return statement;
  }
 
  public XStatement makeStatement(){
    String lable = null;
    XStatement block = null;
    XStatement block2 = null;
    XStatement statement = null;
    XStatement statement2 = null;
    XStatement statement3 = null;
    XToken oldtoken;
    startLineBlock();
    switch(token.kind){
    case SYNCHRONIZED:
      lexer.notSure();
View Full Code Here

Examples of xscript.compiler.XTree.XStatement

  }

  private XStatement makeGroup() {
    startLineBlock();
    expected(XTokenKind.LGROUP);
    XStatement statement = makeInnerStatement();
    expected(XTokenKind.RGROUP);
    return new XGroup(endLineBlock(), statement);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.