Changeset 3810 for branches/2.4-stable


Ignore:
Timestamp:
Oct 9, 2007, 12:06:20 PM (14 years ago)
Author:
Nicklas Nordborg
Message:

References #796: Don't create indexes on primary key columns for tables in the dynamic database

Indexes (other than primary keys) are no longer created for tables in the dynamic database.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.4-stable/src/core/net/sf/basedb/core/VirtualColumn.java

    r3679 r3810  
    6868  */
    6969  public static final VirtualColumn CUBE =
    70     new VirtualColumn("cube", "cube", Hibernate.SHORT, 0, INDEXED, !NULLABLE, PRIMARY_KEY);
     70    new VirtualColumn("cube", "cube", Hibernate.SHORT, 0,
     71      !INDEXED, !NULLABLE, PRIMARY_KEY);
    7172   
    7273  /**
     
    7576  */
    7677  public static final VirtualColumn LAYER =
    77     new VirtualColumn("layer", "layer", Hibernate.SHORT, 0, INDEXED, !NULLABLE, PRIMARY_KEY);
     78    new VirtualColumn("layer", "layer", Hibernate.SHORT, 0,
     79      !INDEXED, !NULLABLE, PRIMARY_KEY);
    7880
    7981  /**
     
    8284  */
    8385  public static final VirtualColumn COLUMN =
    84     new VirtualColumn("column", "column", Hibernate.SHORT, 0, INDEXED, !NULLABLE, PRIMARY_KEY);
     86    new VirtualColumn("column", "column", Hibernate.SHORT, 0,
     87      !INDEXED, !NULLABLE, PRIMARY_KEY);
    8588 
    8689  /**
     
    8891  */
    8992  public static final VirtualColumn POSITION =
    90     new VirtualColumn("position", "position", Hibernate.INTEGER, 0, INDEXED, !NULLABLE, PRIMARY_KEY);
     93    new VirtualColumn("position", "position", Hibernate.INTEGER, 0,
     94      !INDEXED, !NULLABLE, PRIMARY_KEY);
    9195 
    9296  /**
     
    9599  */
    96100  public static final VirtualColumn FILTER =
    97     new VirtualColumn("filter", "filter", Hibernate.SHORT, 0, INDEXED, !NULLABLE, PRIMARY_KEY);
     101    new VirtualColumn("filter", "filter", Hibernate.SHORT, 0,
     102      !INDEXED, !NULLABLE, PRIMARY_KEY);
    98103
    99104  /**
     
    102107  */
    103108  public static final VirtualColumn EXTRA =
    104     new VirtualColumn("extra", "extra", Hibernate.SHORT, 0, INDEXED, !NULLABLE, PRIMARY_KEY);
     109    new VirtualColumn("extra", "extra", Hibernate.SHORT, 0,
     110      !INDEXED, !NULLABLE, PRIMARY_KEY);
    105111
    106112  /**
     
    110116  */
    111117  public static final VirtualColumn REPORTER_ID =
    112     new VirtualColumn("reporterId", "reporter_id", Hibernate.INTEGER, 0, INDEXED, NULLABLE, !PRIMARY_KEY);
     118    new VirtualColumn("reporterId", "reporter_id", Hibernate.INTEGER, 0,
     119      !INDEXED, NULLABLE, !PRIMARY_KEY);
    113120
    114121  /**
     
    118125  */
    119126  public static final VirtualColumn RAWDATA_ID =
    120     new VirtualColumn("rawDataId", "rawdata_id", Hibernate.INTEGER, 0, INDEXED, !NULLABLE, PRIMARY_KEY);
     127    new VirtualColumn("rawDataId", "rawdata_id", Hibernate.INTEGER, 0,
     128      !INDEXED, !NULLABLE, PRIMARY_KEY);
    121129 
    122130  /**
     
    126134  */
    127135  public static final VirtualColumn RAWBIOASSAY_ID =
    128     new VirtualColumn("rawBioAssayId", "rawbioassay_id", Hibernate.INTEGER, 0, INDEXED, !NULLABLE, PRIMARY_KEY);
     136    new VirtualColumn("rawBioAssayId", "rawbioassay_id", Hibernate.INTEGER, 0,
     137      !INDEXED, !NULLABLE, PRIMARY_KEY);
    129138
    130139  /**
     
    132141  */
    133142  public static final VirtualColumn EXTRA_INT =
    134     new VirtualColumn("extraInt", "value", Hibernate.INTEGER, 0, !INDEXED, NULLABLE, !PRIMARY_KEY);
     143    new VirtualColumn("extraInt", "value", Hibernate.INTEGER, 0,
     144      !INDEXED, NULLABLE, !PRIMARY_KEY);
    135145
    136146  /**
     
    138148  */
    139149  public static final VirtualColumn EXTRA_FLOAT =
    140     new VirtualColumn("extraFloat", "value", Hibernate.FLOAT, 0, !INDEXED, NULLABLE, !PRIMARY_KEY);
     150    new VirtualColumn("extraFloat", "value", Hibernate.FLOAT, 0,
     151      !INDEXED, NULLABLE, !PRIMARY_KEY);
    141152
    142153  /**
     
    144155  */
    145156  public static final VirtualColumn EXTRA_STRING =
    146     new VirtualColumn("extraString", "value", Hibernate.STRING, 255, !INDEXED, NULLABLE, !PRIMARY_KEY);
     157    new VirtualColumn("extraString", "value", Hibernate.STRING, 255,
     158      !INDEXED, NULLABLE, !PRIMARY_KEY);
    147159
    148160  /**
    149161    A cache of virtual column objects for channels.
    150162  */
    151   private static final Map<Integer, VirtualColumn> channels = new HashMap<Integer, VirtualColumn>();
     163  private static final Map<Integer, VirtualColumn> channels =
     164    new HashMap<Integer, VirtualColumn>();
    152165 
    153166  /**
    154167    A cache of virtual column objects for extra value types.
    155168  */
    156   private static final Map<Type, VirtualColumn> extraValueColumns = new HashMap<Type, VirtualColumn>();
     169  private static final Map<Type, VirtualColumn> extraValueColumns =
     170    new HashMap<Type, VirtualColumn>();
    157171 
    158172  // Initialise the cache
     
    173187    if (ch == null)
    174188    {
    175       ch = new VirtualColumn("ch"+channel, "ch"+channel, Hibernate.FLOAT, 0, !INDEXED, NULLABLE, !PRIMARY_KEY);
     189      ch = new VirtualColumn("ch"+channel, "ch"+channel, Hibernate.FLOAT, 0,
     190          !INDEXED, NULLABLE, !PRIMARY_KEY);
    176191      synchronized (channels)
    177192      {
Note: See TracChangeset for help on using the changeset viewer.