Changeset 34903


Ignore:
Timestamp:
2021-02-19T17:38:54+13:00 (3 years ago)
Author:
davidb
Message:

Rolled back to r34900

Location:
gs2-extensions/tipple-bridge/trunk/src
Files:
2 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/tipple-bridge/trunk/src/src/main/java/sqlCli.java

    r34901 r34903  
    4747    String dbName;
    4848
     49    //project id - it should be required right?
     50    //if they omit, the query would come up empty.
     51    @Option(names = {"--projectID"}, description = "ID number of the project")
     52    String projectID;
     53
    4954    @Option(names = {"--host"}, description = "Type of host e.g. localhost ",
    5055            required = true, defaultValue = "localhost")
     
    7075        //else we're good to go.
    7176       // databaseConnect(userName, password, port, dbName, projectID, jsonOutputFile, host);
    72         int status = databaseConnect(userName, password, port, dbName, jsonOutputFile, host);
     77        int status = databaseConnect(userName, password, port, dbName, projectID, jsonOutputFile, host);
    7378        return status;
    7479    }
     
    8186
    8287    private static int databaseConnect(String user, String pass, int port, String dbName,
    83                                         String fileName, String host){
     88                                        String projectID, String fileName, String host){
    8489        Connection conn;
    8590        Statement stmt;
     
    117122             */
    118123
    119            // String sql = "SELECT name, id, typeId, created from td_ContentItem where projectId="+projectID;
    120 
    121             String sql = "SELECT  cItem.name, cItem.created, mFile.path\n" +
    122                     "FROM td_ManagedFile AS mFile, td_ContentItem AS cItem, td_ContentItem_MediaItem AS cMediaItem, td_MediaItem AS mItem\n" +
    123                     "WHERE\n" +
    124                     "cItem.id = cMediaItem.contentItemId \n" +
    125                     "and cMediaItem.mediaItemId = mItem.id\n" +
    126                     "And mItem.fileId = mFile.id\n" +
    127                     "ORDER BY mFile.projectId;\n";
     124            String sql = "SELECT name, id, typeId, created from td_ContentItem where projectId="+projectID;
     125/*
     126            String sql = "select td_Document.id, td_Document.content " +
     127                    "from td_Document, td_ContentItem, td_ContentItem_Document " +
     128                    "where td_ContentItem.projectId=" + projectID + " and td_ContentItem.id =
     129                    td_ContentItem_Document.ContentItemId " +
     130                    "and td_ContentItem_Document.documentId = td_Document.id;";
     131*/
    128132            ResultSet myResult = stmt.executeQuery(sql);
    129133            ResultSetMetaData resultMetaData = myResult.getMetaData();
Note: See TracChangeset for help on using the changeset viewer.