|
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright Buildbot Team Members
# A fixed component of the DBConnector, handling one particular aspect of # the database. Instances of subclasses are assigned to attributes of the # DBConnector object, so that they are available at e.g., # C{master.db.model} or C{master.db.changes}. This parent class takes care # of the necessary backlinks and other housekeeping.
# set up caches
# for use by subclasses to check that 'value' will fit in 'col', where # 'col' is a table column from the model.
# ignore this check for database engines that either provide this error # themselves (postgres) or that do not enforce maximum-length # restrictions (sqlite) else: # not necessary, so just stub out the method
"value for column %s is greater than max of %d characters: %s" % (col, col.type.length, value))
lambda key : meth(component, key))
|