Пример #1
0
    def test_is_empty(self):
        builder = SelectBuilder()

        self.assertTrue(builder.is_empty())

        builder.add("B", "a")

        self.assertFalse(builder.is_empty())

        builder.add("B", "b") \
            .add("C", "c")

        self.assertFalse(builder.is_empty())
Пример #2
0
 def __build_regular(self, table_name, types, names, key_name, key_value):
     builder = SelectBuilder().table(table_name)
     for field_name in types.keys():
         builder.add(table_name, names[field_name])
     builder.where(names[key_name], types[key_name], key_value)
     return builder