{"id":27890313,"url":"https://github.com/tibcosoftware/as2-jdbc","last_synced_at":"2025-05-05T10:46:44.558Z","repository":{"id":23421556,"uuid":"26784328","full_name":"TIBCOSoftware/as2-jdbc","owner":"TIBCOSoftware","description":"JDBC for TIBCO ActiveSpaces","archived":false,"fork":false,"pushed_at":"2019-06-18T22:59:59.000Z","size":227,"stargazers_count":4,"open_issues_count":2,"forks_count":4,"subscribers_count":34,"default_branch":"master","last_synced_at":"2024-04-14T07:45:56.988Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TIBCOSoftware.png","metadata":{"files":{"readme":"Readme.txt","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-18T00:28:17.000Z","updated_at":"2020-06-07T14:25:59.000Z","dependencies_parsed_at":"2022-08-18T23:02:21.876Z","dependency_job_id":null,"html_url":"https://github.com/TIBCOSoftware/as2-jdbc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TIBCOSoftware%2Fas2-jdbc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TIBCOSoftware%2Fas2-jdbc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TIBCOSoftware%2Fas2-jdbc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TIBCOSoftware%2Fas2-jdbc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TIBCOSoftware","download_url":"https://codeload.github.com/TIBCOSoftware/as2-jdbc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252485774,"owners_count":21755823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-05T10:46:43.952Z","updated_at":"2025-05-05T10:46:44.549Z","avatar_url":"https://github.com/TIBCOSoftware.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\n                TIBCO ActiveSpaces JDBC Driver               Last Updated: 2016-06-29\r\n\r\nOverview\r\n--------\r\nThe TIBCO ActiveSpaces JDBC Driver provides Java applications with the ability to interact with\r\nActiveSpaces through the use of SQL commands. The driver can be used to port existing applications,\r\nwhich already use a JDBC driver to interact with a database, to TIBCO ActiveSpaces. The\r\nTIBCO ActiveSpaces JDBC Driver can also facilitate the use of TIBCO ActiveSpaces by those users\r\nwho are familiar with the use of JDBC drivers by reducing their learning curve.\r\n\r\nThis is a partial implementation of a JDBC driver for TIBCO ActiveSpaces. The driver has\r\nbeen developed to support the following SQL commands:\r\n\r\n    - CREATE TABLE\r\n    - INSERT\r\n    - UPDATE\r\n    - DELETE\r\n    - SELECT\r\n\r\nIt is important to note that in some cases only partial support for a command has been implemented.\r\nThis is especially true for the SELECT command. See the sections for each command below\r\nfor a description of what has or has not been implemented.\r\n\r\nThe TIBCO ActiveSpaces JDBC Driver is designed to be a layer that sits on top of existing TIBCO\r\nActiveSpaces software and utilizes the Java API of TIBCO ActiveSpaces. This design requires the\r\nActiveSpaces software to be installed on each machine running processes which utilize the TIBCO\r\nActiveSpaces JDBC Driver.  Since TIBCO ActiveSpaces is also designed so that each machine running\r\na TIBCO ActiveSpaces application requires TIBCO ActiveSpaces software to be installed, there was\r\nno need to design a JDBC driver which communicates to TIBCO ActiveSpaces using a network\r\nprotocol (JDBC Type 3 driver). Since TIBCO ActiveSpaces does not really have a specific database\r\nprotocol, it also did not make sense to implement a JDBC Type 4 driver.\r\n\r\n\r\nSQL Syntax Support\r\n------------------\r\nThe ActiveSpaces JDBC Driver has been developed to support common SQL syntax but the syntax has \r\nbeen simplified and customized for ActiveSpaces. It is *not* intended that the TIBCO ActiveSpaces \r\nJDBC Driver should be a JDBC Driver \"adapter\" for other databases. Therefore, in some cases the SQL\r\nsyntax recognized by other databases may not be recognized by the ActiveSpaces JDBC driver. Currently,\r\nthe ActiveSpaces JDBC Driver really only supports basic SQL command functionality.\r\n\r\nThe ActiveSpaces JDBC driver provides additional syntax support for cases where a normal SQL command \r\ndoes not provide adequate functionality for ActiveSpaces. For example, the syntax of the CREATE TABLE \r\ncommand has been extended to accept additional parameters which provide full support for defining an \r\nActiveSpaces space.\r\n\r\nThe ActiveSpaces JDBC Driver does not support the following (this is a partial list):\r\n\r\n    - Schemas\r\n    - Modules\r\n    - Unicode String \u0026 Identifiers\r\n\r\nSee the sections on the individual commands for information about the limitations of a particular\r\ncommand.\r\n\r\n\r\nJDBC Driver Implemenation Directories\r\n-------------------------------------\r\nThe TIBCO ActiveSpaces JDBC Driver sources reside in several directories as described below:\r\n\r\n    src/com/tibco/as/jdbc - Contains the classes which implement the Java JDBC interfaces.\r\n    \r\n    src/com/tibco/as/sql/grammar - Contains the ANTLR grammar and the files automatically \r\n        generated by ANTLR which are used to parse SQL commands passed to the JDBC driver.\r\n    \r\n    src/com/tibco/as/sql - Contains the classes which actually process the SQL commands by \r\n        making the appropriate calls into ActiveSpaces. The methods of the class ASSQLProcessor\r\n        are invoked to cause the processing of each SQL command to occur.\r\n    \r\n    examples - Contain several examples which are intended to help learn about using the\r\n        TIBCO ActiveSpaces JDBC Driver.\r\n\r\n\r\nGetting Started\r\n---------------\r\nSeveral examples are provided with the TIBCO ActiveSpaces JDBC Driver which are intended to help\r\nteach you how to use the driver in different scenarios as follows:\r\n\r\n    - SimpleJDBC uses the TIBCO ActiveSpaces JDBC Driver to interact with ActiveSpaces using\r\n      SQL commands.\r\n      \r\n    - MixedASJdbc combines the use of the TIBCO ActiveSpaces Java API with the use of the JDBC driver.\r\n      The TIBCO ActiveSpaces Java API is first used to define and connect to a metaspace and space.\r\n      Then the JDBC driver is used after that to manipulate the data in the space.\r\n      \r\n    - MixedJdbcAS also combines the use of the TIBCO ActiveSpaces Java API with the use of the\r\n      JDBC driver. However, in this example the JDBC driver is used to first define and connect to\r\n      a metaspace and space and then the TIBCO ActiveSpaces Java API is used to manipulate the\r\n      data in the space.\r\n\r\nIt is recommended that you start with the example SimpleJDBC. The comments in the example will \r\nwalk you through setting up your environment, building the driver and the example, and then\r\nrunning the example. The comments throughout the code try to explain what is going on and things\r\nyou need to pay attention to. However, the comments do not attempt to rewrite the TIBCO ActiveSpaces\r\nDeveloper's Guide. For information on the TIBCO ActiveSpaces objects and the Java API, you should read\r\nthe developer's guide and the JavaDoc for the API.\r\n\r\nBoth of the 'mixed' examples point out important things about how to use the TIBCO ActiveSpaces\r\nJDBC Driver with the TIBCO ActiveSpaces Java API. Read the comments in the code!\r\n\r\nNote: If you get a Java Verify Error when running the examples, you will need to specify the\r\nfollowing VM argument to get past the error:\r\n    -XX:-UseSplitVerifier\r\n\r\n\r\nJDBC URL\r\n--------\r\nThe standard syntax for JDBC URLs is:\r\n    jdbc:\u003csubprotocol\u003e:\u003csubname\u003e    \r\nwhere:\r\n    subprotocol is the name of the driver or the name of a database connectivity mechanism\r\n    subname is a way to identify the data source \r\n    \r\nThe ActiveSpaces JDBC URL has been extended from the standard JDBC URL syntax to provide users the ability\r\nto specify the various settings for connecting to an ActiveSpaces metaspace.  The ActiveSpaces JDBC URL format\r\nis:\r\n\r\n    jdbc:tibco:as[:\u003cdata-source-name\u003e][;\u003cpropertyName\u003e=\u003cpropertyValue\u003e]*\r\n    \r\nThe \u003cdata-source-name\u003e is optional and specifies the metaspace name. The metaspace name can also be specified\r\nas a property as in the following example URL:\r\n\r\n    jdbc:tibco:as;metaspace=mymetaspace\r\n    \r\nIf the metaspace name is not specified as a property or as \u003cdata-source-name\u003e, the default metaspace name of 'ms'\r\nis used.\r\n\r\nThis format for the JDBC URL for ActiveSpaces was chosen because it is similar to the formats used by the MySQL,\r\nMicrosoft SQL Server and the Oracle Thin Client JDBC URLs.\r\n\r\nThe following lists the possible properties which can be set for a metaspace. Of these properties, the metaspace\r\nproperty and the discovery property must be identical for all applications trying to connect to the same metaspace. \r\nA new metaspace is created for any application which uses a different metaspace or discovery property setting than\r\nother applications.\r\n\r\n    Property               Description\r\n    ---------              ------------\r\n    metaspace              Metaspace name (default: 'ms')\r\n    discovery              Metaspace discovery URL - how the metaspace discovers its members (default: tibpgm://239.8.8.8:7888).\r\n                           To specify several well-known TCP addresses for discovery use tcp://ip1:port1;ip2:port2\r\n    security_token         Path to a security token file. If specified, any discovery setting specified in the JDBC URL is ignored\r\n                           as AS will use the discovery setting from the token file.\r\n    member_name            Unique name to use for the member connecting to the metaspace (default: auto-generated)\r\n    listen                 URL to use for listening for incoming connections from new metaspace members on. \r\n                           Format: tcp://[interface[:port]]  (default:  0.0.0.0 for the interface and the first port available\r\n                           starting from port 5000 and above.)\r\n    remote_listen          The URL to use to listen for remote client connections (optional).\r\n    remote_discovery       Discovery URL for connecting to a metaspace as a remote client. However, it is preferred that the\r\n                           discovery URL property be used to specify the remote discovery URL as in\r\n                           discovery=tcp://IP:port?remote=true. (optional)\r\n    transport_thread_count The number of threads a metaspace member can use for handling remote invocation calls.\r\n\r\nIf a security token file has been specified, the following additional properties can also be specified:\r\n\r\n    Property                  Description\r\n    ---------                 ------------\r\n    authentication_domain     The user login domain\r\n    authentication_username   The user login name\r\n    authentication_password   The user login password.\r\n\r\nAlthough ActiveSpaces only allows one metaspace connection by a single application, the JDBC driver will allow you to\r\nuse multiple Connection objects to the same metaspace within a single application.\r\n\r\n\r\nANTLR Grammar\r\n-------------\r\nAn ANTLR grammar is used to parse the SQL query strings passed to the ActiveSpaces JDBC Driver. The grammar file is \r\ncom/tibco/as/sql/grammar/ASSQL.g. Three files are automatically generated by ANTLR for this grammar. They are:\r\n\r\n    ASSQLLexer.java\r\n    ASSQLParser.java\r\n    ASSQLTokens.java\r\n    \r\nOnly the grammar file should ever be modified. These three files generated by ANTLR should never be directly modified.\r\n\r\nThe ASSQL.g grammar file is written to use Java. Since JDBC is Java based, there is no reason to expect that any other\r\nlanguage would need to be supported. Inside of the grammar, the appropriate Java class is created to handle each different\r\nsupported SQL command. It was felt that embedding the Java code inside of the grammar would be easier to understand for those\r\nusers who do not understand ANTLR.\r\n\r\nSometimes the driver's grammar allows an SQL command but portions of the command syntax are\r\nignored by the driver implementation. The idea in developing the grammar for this driver was to allow\r\ncommon SQL syntax even though full support for the command may not have been implemented in the driver.\r\nFor example, the following command is successfully parsed by the driver even though support for\r\nLIMIT and OFFSET has not been implemented:\r\n    SELECT * FROM mytable LIMIT 100 OFFSET 0\r\n\r\nImportant!! SQL WHERE clauses are not fully supported. Currently the WHERE clause is used, in its\r\nentirety, as an ActiveSpaces filter. However, the grammar still needs work to completely support\r\nthe successful parsing of all possible filter formats. Only simple filters are currently\r\nsupported such as:\r\n    key=value\r\n    name='Joe Smith'  (Note, the driver converts SQL single quotes to the double-quotes used by filters.)\r\n    age\u003e50\r\n    name = 'John'' Doe'\r\n    name = 'John'' Doe' and city = 'Bangalore'\r\n    name = 'John'' Doe' or income = 50150.50\r\n    name = 'John'' Doe' or (income \u003e 50150.50 and age \u003e 0)\r\n    city is not null\r\n    where city is null\r\n    where city like 'View'\r\n\r\n\r\nBuilding the ANTLR Grammar\r\n--------------------------\r\nIf you find that you need to modify the grammar and build it yourself, you will\r\nneed to download the ANTLR v3 task for ant from:\r\n    http://www.antlr3.org/share/list.html\r\n\r\nExtract the contents of the zip file and copy the file ant-antlr3.jar into\r\nyour ANT lib directory.\r\n\r\nEnsure you have both your AS_HOME and ANT_HOME environment variables set.\r\nChange to the AS_HOME/examples/java/JDBCDriver directory and type:\r\n    ant grammar -verbose\r\n\r\nThis will build the grammar in a temporary 'grammar' directory and if the build\r\nis successful, it will then copy the resulting Lexer and Parser files into the\r\nAS_HOME/examples/java/JDBCDriver/src/com/tibco/as/sql/grammar directory.\r\n\r\n\r\nSQL Command Overview\r\n--------------------\r\nAs mentioned above, the following SQL commands are supported:\r\n\r\n    - CREATE TABLE\r\n    - INSERT\r\n    - UPDATE\r\n    - DELETE\r\n    - SELECT\r\n\r\nThe SQL keywords for each command are case insensitive. For example, the following three SQL commands are equivalent:\r\n\r\n    SELECT * FROM mytable\r\n    select * from mytable\r\n    Select * From mytable\r\n\r\nWhen strings are specified as values in an SQL command, strings should be enclosed in single quotes and not double quotes.\r\nFor example:\r\n\r\n    INSERT INTO mytable (column1, column2) VALUES (George, Washington)\r\n    \r\nWhen you need to use a table name or column name that matches an SQL keyword, you should enclose the name in escaped\r\ndouble-quotes to allow the ANTLR parser to differentiate between the keyword and the name. For example:\r\n\r\n    CREATE TABLE myspace (\\\"key\\\" INTEGER NOT NULL, value VARCHAR, \\\"time\\\" DATETIME, PRIMARY KEY (\\\"key\\\"))\r\n\r\n\r\nCREATE TABLE Basic Syntax\r\n-------------------------\r\nCREATE TABLE is used to define a TIBCO ActiveSpaces space, which is the equivalent of a database table.\r\nSince an ActiveSpaces space is defined using specific space properties other than the normal field definitions\r\nof a database table, the CREATE TABLE syntax has been extended to allow users to specify space properties.\r\n\r\nBasic Syntax:\r\n\r\n    CREATE  TABLE  \u003ctable_name\u003e   (  \u003ctable_element\u003e   [,  \u003ctable_element\u003e  ]...  ) \r\n    \r\nWhere:\r\n\r\n  \u003ctable_element\u003e =\r\n      \u003ccolumn_name\u003e  \u003ccolumn_type\u003e  [ NOT NULL]  [PRIMARY KEY]\r\n     \r\nOr:\r\n\r\n  \u003ctable_element\u003e = \r\n      [CONSTRAINT Identifier]  PRIMARY KEY  [ \u003ckey_type\u003e  ]   ( \u003ccolumn_name\u003e  [,  \u003ccolumn_name\u003e ]...  )\r\nOr:\r\n\r\n  \u003ctable_element\u003e = \r\n      INDEX  \u003ctable_index_name\u003e   [ \u003ckey_type\u003e ]  ( \u003ccolumn_name\u003e  [, \u003ccolumn_name\u003e ]...  ) \r\n\r\nExample:\r\n\r\n    CREATE TABLE mytable (name VARCHAR(255) NOT NULL, age INTEGER, city VARCHAR(255), zipcode INTEGER, income REAL, PRIMARY KEY (name), INDEX age ( age)) \r\n    \r\nNotes:\r\n\r\nCONSTRAINT Identifier is ignored, if specified, but is allowed by the grammar in order to be compatible with other \r\ncommon SQL syntax variations.\r\n\r\n\u003ckey_type\u003e is an ActiveSpaces extension to allow the setting of the type of index to generate.  For key fields, \r\nActiveSpaces by default will automatically generate an index of type HASH which speeds up queries where the filter \r\nis an exact match (= operator). Regular indexes are created with a default index type of TREE. TREE indexes speed\r\nup queries where the filter is a range match (\u003e, \u003c, \u003e=, \u003c= operators). The \u003ckey_type\u003e extension allows you\r\nto control which type of index is created to suit your particular needs. \r\n\r\nColumns in a table are the equivalent of ActiveSpaces fields in a space. ActiveSpaces does not support all of the\r\nSQL column types for the fields in a space.  The following table shows how the SQL column types are mapped to what\r\nActiveSpaces supports for field types:\r\n\r\n    SQL Column Type        ActiveSpaces Field Data Type\r\n    ---------------        ----------------------------\r\n    BIT                    Boolean\r\n    CHAR                   FieldDef.FieldType.CHAR\r\n    CHAR(1)                FieldDef.FieldType.CHAR\r\n    VARCHAR                FieldDef.FieldType.STRING\r\n    CHAR(n) where n\u003e1      FieldDef.FieldType.STRING\r\n    VARCHAR(n)             FieldDef.FieldType.STRING\r\n    LONGVARCHAR            FieldDef.FieldType.STRING\r\n    LONGVARCHAR(n)         FieldDef.FieldType.STRING\r\n    SMALLINT               FieldDef.FieldType.SHORT\r\n    INTEGER                FieldDef.FieldType.INTEGER\r\n    BIGINT                 FieldDef.FieldType.LONG\r\n    REAL                   FieldDef.FieldType.FLOAT\r\n    DOUBLE                 FieldDef.FieldType.DOUBLE\r\n    BLOB                   FieldDef.FieldType.BLOB\r\n    DATE                   FieldDef.FieldType.DATETIME\r\n    TIME                   FieldDef.FieldType.DATETIME\r\n    TIMESTAMP              FieldDef.FieldType.DATETIME\r\n\r\nNote: Currently support for BLOB has not been implemented.\r\n\r\nWhen the type of a column is retrieved from the ResultSetMetaData object, for those SQL columns which map to the same\r\nActiveSpaces field data type, the SQL column type listed first in the table is the type that will be returned. For example,\r\ncalling ResultSetMetaData.getColumnType for a column which was defined as SQL column type TIME, will result in the SQL\r\ncolumn type of DATE being returned. And if a column was defined as SQL column type CHAR(255), the SQL column type returned\r\nfrom ResultSetMetaData.getColumnType will be VARCHAR.\r\n\r\nThe implementation of an ActiveSpaces field type may be different from the SQL column type. For an explanation of each of\r\nthe ActiveSpaces field types, see the ActiveSpaces documentation. \r\n\r\n\r\nCREATE TABLE Extended Syntax\r\n----------------------------\r\nAn extended form of the CREATE TABLE syntax is available which additionally allows setting the properties of a space.\r\nIf not specified, the normal ActiveSpaces default for these properties will be used.\r\n\r\nExtended Syntax:\r\n\r\n    CREATE  TABLE  \u003ctable_name\u003e   ( \u003ctable_element\u003e  [, \u003ctable_element\u003e]...  )  [ \u003cspace_property\u003e  =  \u003cvalue\u003e [,  \u003cspace_property\u003e  =  \u003cvalue\u003e ]...\r\n    \r\nWhere \u003cspace_property\u003e can be any of the following (case insensitive):\r\n\r\n    capacity\r\n    cache_policy\r\n    distribution_policy\r\n    eviction_policy\r\n    file_sync_interval\r\n    forget_old_value\r\n    host_aware_replication\r\n    lock_scope\r\n    lock_TTL\r\n    lock_wait\r\n    min_seeders\r\n    persistence_policy\r\n    persistence_type\r\n    phase_count\r\n    phase_interval\r\n    query_limit\r\n    query_timeout\r\n    read_timeout\r\n    replication_count\r\n    replication_policy\r\n    routed\r\n    space_wait\r\n    ttl\r\n    virtual_node_count\r\n    write_timeout\r\n\r\nSee the ActiveSpaces documentation for the valid values for these properties.\r\n\r\nExample:\r\n\r\n    CREATE TABLE mytable (name VARCHAR(255) NOT NULL, age INTEGER, city VARCHAR(255), zipcode INTEGER, income REAL, PRIMARY KEY (name, age), INDEX income ( income)) DISTRIBUTION_POLICY distributed, TTL -1, REPLICATION_COUNT 1\r\n\r\n\r\nINSERT Command\r\n--------------\r\nThe INSERT command is used to add data into a space. If an entry already exists in the space, an error will be returned.\r\n\r\nSyntax:\r\n\r\n    INSERT  INTO  \u003ctable_name\u003e  ( \u003ccolumn_name\u003e  [,  \u003ccolumn_name\u003e ]... )  VALUES  ( \u003ccolumn_value\u003e  [, \u003ccolumn_value\u003e ]...  )\r\n    \r\nExample:\r\n\r\n    INSERT INTO mytable (name, city) VALUES (John Doe, Dallas)\r\n\r\n\r\nUPDATE Command\r\n--------------\r\nThe UPDATE command is used to modify the values of data which already resides in the space.\r\n\r\nSyntax:\r\n\r\n    UPDATE  \u003ctable_name\u003e  SET  ( \u003ccolumn_name\u003e = \u003ccolumn_value\u003e  [, \u003ccolumn_name\u003e = \u003ccolumn_value\u003e ]... )  WHERE  [ \u003cwhere_condition\u003e ]\r\nExample:\r\n\r\n    UPDATE mytable SET age=80 WHERE name = George Washington\r\n    \r\nNotes:\r\nIf a \u003cwhere_condition\u003e is not specified, all entries in the table will be updated.\r\nCurrently the \u003cwhere_condition\u003e is not parsed but is used in its entirety as a filter for browsing the space entries.\r\nTherefore, the \u003cwhere_condition\u003e cannot handle things like embedded SELECT queries and must be specified in such a way\r\nthat ActiveSpaces will be able to properly use it as a filter. See the ActiveSpaces documentation for information on\r\nhow to format filter strings. The one exception for specifying a where clause is that the value for strings should be\r\nspecified with single qutoes to follow SQL syntax rules as opposed to double quotes which is the normal ActiveSpaces\r\nfilter syntax rule.\r\n\r\n\r\nDELETE Command\r\n--------------\r\nThe DELETE command is used to remove entries from a space.\r\n\r\nSyntax:\r\n\r\n    DELETE  FROM  \u003ctable_name\u003e  WHERE  [ \u003cwhere_condition\u003e  ]\r\n    \r\nExample:\r\n\r\n    DELETE FROM mytable WHERE name = 'Joe Smith'\r\n    \r\nNotes:\r\nIf a \u003cwhere_condition\u003e is not specified, all entries in the table will be deleted.\r\nCurrently the \u003cwhere_condition\u003e is not parsed but is used in its entirety as a filter for browsing the space entries.\r\nTherefore, the \u003cwhere_condition\u003e cannot handle things like embedded SELECT queries and must be specified in such a way\r\nthat ActiveSpaces will be able to properly use it as a filter. See the ActiveSpaces documentation for information on how\r\nto format filter strings. The one exception for specifying a where clause is that the value for strings should be specified\r\nwith single qutoes to follow SQL syntax rules as opposed to double quotes which is the normal ActiveSpaces filter syntax rule.\r\n\r\n\r\nSELECT Command\r\n--------------\r\nThe SELECT Command is used for retrieving data from a space.\r\n\r\nSyntax:\r\n\r\n    SELECT  [ \u003cselect_quantifier\u003e ]  \u003cselect_list\u003e  FROM  \u003ctable_list\u003e  [ \u003cwhere_condition\u003e ]\r\n    \r\nWhere:\r\n\r\n  \u003cselect_quantifier\u003e is currently ignored but allowed values are ALL or DISTINCT\r\n  \r\n  \u003cselect_list\u003e  can be any of:\r\n      -    * (Asterisk, meaning all columns)\r\n      -    \u003ctable_name\u003e.*  (meaning all columns of the specified table, the table must also be in the FROM table list)\r\n      -    \u003ccolumn_name\u003e  [ AS  \u003ccolumn_alias\u003e  ] [,  \u003ccolumn_name\u003e  [ AS  \u003ccolumn_alias\u003e  ] ]...   (use when only a single table is in the FROM table list)\r\n      -    \u003ctable_name\u003e.\u003ccolumn_name\u003e  [ AS  \u003ccolumn_alias\u003e  ]  [,  \u003ctable_name\u003e.\u003ccolumn_name\u003e  [ AS  \u003ccolumn_alias\u003e  ]  ]...  (use when multiple tables are specified in the FROM table list)\r\n      \r\n  \u003ctable_list\u003e has the format:\r\n      \u003ctable_name\u003e  [,  \u003ctable_name\u003e  ]...\r\n      \r\nExamples:\r\n\r\n    SELECT * FROM mytable\r\n    SELECT * FROM mytable WHERE field1 = success\r\n    SELECT firstname, lastname FROM mytable\r\n    SELECT firstname, lastname FROM table1, table2 (table2 is ignored, use qualified column names when there are multiple tables)\r\n    SELECT table1.name, table2.address FROM table1, table2  (null values will be filled in for missing values if one table is larger than the other)\r\n    SELECT table1.name AS table1name, table2.address AS table2address FROM table1, table2  (results of select statement are retrieved from the ResultSet object using the specified column alias names)\r\n    \r\nNotes:\r\n  When multiple FROM tables are listed, the dot notation for specifying the columns to retrieve is required even if a column is\r\n  only present in one of the tables.\r\n  \r\n  If a \u003cwhere_condition\u003e is not specified, all entries in the table will be selected.\r\n  \r\n  Currently the \u003cwhere_condition\u003e is not parsed but is used in its entirety as a filter for browsing the space entries. Therefore,\r\n  the \u003cwhere_condition\u003e cannot handle things like embedded SELECT queries and must be specified in such a way that ActiveSpaces\r\n  will be able to properly use it as a filter. See the ActiveSpaces documentation for information on how to format filter strings.\r\n  The following are a couple of exceptions to keep in mind:\r\n    The value for strings should be specified with single quotes to follow SQL syntax rules as opposed to double quotes which\r\n    is the normal ActiveSpaces filter syntax rule. The JDBC driver grammar takes care of coverting the single quotes to double\r\n    quotes for you.\r\n    \r\n    The value for DateTime fields should be specified without any single or double quotes. The JDBC driver grammar takes care\r\n    of converting the DateTime value to have single quotes as is required by ActiveSpaces filters. The format for DateTime\r\n    field values are:\r\n        YYYY-MM-DD\r\n        HH:MM:SS[.MS] [GMT]\r\n        YYYY-MM-DDTHH:MM:SS[.MS] [GMT]\r\n\r\n\r\nLimiting The Number of SELECT Results\r\n-------------------------------------\r\nBy default, the AS JDBC driver will use an ActiveSpaces SNAPSHOT browser for retrieving data from a space/table when a SELECT\r\ncommand is issued. The SNAPSHOT browser will use a default prefetch size of 5000 with no limit on the number of rows returned.\r\n\r\nTo limit the number of rows returned for a SELECT command, Statement.setMaxRows() should be invoked prior to issuing a SELECT command.\r\n\r\nWhen max rows is set to 0 (default), no limit is applied to the number of rows returned for a SELECT command.\r\n\r\nIf max rows is greater than 0, the number of rows returned for a SELECT command will be limited to what has been specified for max rows.\r\n\r\nTo change the prefetch size used for the SELECT command or to switch from using a SNAPSHOT browser to a CURRENT browser, Statement.setFetchSize() should be invoked prior to issuing a SELECT command.\r\n\r\nWhen the fetch size is set to 0 (zero), the JDBC driver will use its default prefetch size of 5000.\r\n\r\nWhen the fetch size is set to \u003e 0, the SNAPSHOT browser used by the SELECT command will used the specified fetch size as its prefetch setting.\r\n\r\nWhen the fetch size is set to -1, a CURRENT browser will be used by the SELECT command instead of a SNAPSHOT browser. A CURRENT browser does not prefetch data and retrieves a row of data each time next() is called on the ResultSet. A CURRENT browser also ignores any query limit setting, so the number of rows returned for the SELECT command will not be limited.\r\n\r\n\r\n\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftibcosoftware%2Fas2-jdbc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftibcosoftware%2Fas2-jdbc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftibcosoftware%2Fas2-jdbc/lists"}