Revision 29148653 snf-pithos-backend/pithos/backends/lib/sqlite/xfeatures.py

b/snf-pithos-backend/pithos/backends/lib/sqlite/xfeatures.py
58 58
                            key        integer,
59 59
                            value      text,
60 60
                            primary key (feature_id, key, value)
61
                            foreign key (feature_id) references xfeatures(feature_id)
61
                            foreign key (feature_id) references
62
                                xfeatures(feature_id)
62 63
                            on delete cascade ) """)
63 64

  
64 65
#     def xfeature_inherit(self, path):
......
119 120
    def feature_set(self, feature, key, value):
120 121
        """Associate a key, value pair with a feature."""
121 122

  
122
        q = "insert or ignore into xfeaturevals (feature_id, key, value) values (?, ?, ?)"
123
        q = ("insert or ignore into xfeaturevals (feature_id, key, value) "
124
             "values (?, ?, ?)")
123 125
        self.execute(q, (feature, key, value))
124 126

  
125 127
    def feature_setmany(self, feature, key, values):
126 128
        """Associate the given key, and values with a feature."""
127 129

  
128
        q = "insert or ignore into xfeaturevals (feature_id, key, value) values (?, ?, ?)"
130
        q = ("insert or ignore into xfeaturevals (feature_id, key, value) "
131
             "values (?, ?, ?)")
129 132
        self.executemany(q, ((feature, key, v) for v in values))
130 133

  
131 134
    def feature_unset(self, feature, key, value):

Also available in: Unified diff