Project

General

Profile

« Previous | Next » 

Revision 751

Added by bojilova almost 23 years ago

change the method name getDateString() to getDateFunction()
return "now()::date" in the DBPostgresql implementation of that method

View differences:

DBPostgresql.java
1 1
/**
2 2
 *  '$RCSfile$'
3
 *    Purpose: A db adapter class for Postgresql RDBMS.
3
 *    Purpose: A db adapter class for PostgreSQL RDBMS.
4 4
 *  Copyright: 2000 Regents of the University of California and the
5 5
 *             National Center for Ecological Analysis and Synthesis
6 6
 *    Authors: Jivka Bojilova
......
30 30
import java.sql.*;
31 31

  
32 32
/**
33
 * The Oracle db adapter implementation.
33
 * The PostgreSQL db adapter implementation.
34 34
 */
35 35
public class DBPostgresql extends DBAdapter {
36 36

  
37 37
  /**
38
   * The Postgresql unique ID /sequence generator
38
   * The PostgreSQL unique ID /sequence generator
39 39
   * The name of the sequence used to generate the unique id 
40 40
   * is made from the name of the table that uses the id by 
41 41
   * appending "_id_seq" to it.
......
62 62
  }
63 63

  
64 64
  /**
65
   * The Postgresql function name that gets the current date 
66
   * from the database server
65
   * The PostgreSQL function name that gets the current date 
66
   * and time from the database server
67 67
   *
68
   * @return return the current date and time function name: "sysdate"
68
   * @return return the current date and time function name: "now()::date"
69 69
   */
70
  public String getDateString() {
70
  public String getDateFunction() {
71 71

  
72
    //System.out.println("Current date string: " + "sysdate");    
73
    return "current_date";
74
		//for current time use current_time
72
    //System.out.println("The date and time function: " + "now()::date");    
73
    return "now()::date";
75 74
  }
76 75

  
77 76
  /**
78
   * Postgresql's string delimiter character: single quote (')
77
   * PostgreSQL's string delimiter character: single quote (')
79 78
   *
80 79
   * @return return the string delimiter: single quote (')
81 80
   */

Also available in: Unified diff