def get_pk_constraint( self, table_name: str, schema: Optional[str] = None ) -> Dict[str, Any]: pk_constraint = self.inspector.get_pk_constraint(table_name, schema) or {} return { key: utils.base_json_conv(value) for key, value in pk_constraint.items() }
def test_base_json_conv(self): assert isinstance(base_json_conv(np.bool_(1)), bool) is True assert isinstance(base_json_conv(np.int64(1)), int) is True assert isinstance(base_json_conv(np.array([1, 2, 3])), list) is True assert isinstance(base_json_conv(set([1])), list) is True assert isinstance(base_json_conv(Decimal("1.0")), float) is True assert isinstance(base_json_conv(uuid.uuid4()), str) is True assert isinstance(base_json_conv(time()), str) is True assert isinstance(base_json_conv(timedelta(0)), str) is True
def test_base_json_conv(self): assert isinstance(base_json_conv(numpy.bool_(1)), bool) is True assert isinstance(base_json_conv(numpy.int64(1)), int) is True assert isinstance(base_json_conv(set([1])), list) is True assert isinstance(base_json_conv(Decimal("1.0")), float) is True assert isinstance(base_json_conv(uuid.uuid4()), str) is True
def test_base_json_conv(self): assert isinstance(base_json_conv(numpy.bool_(1)), bool) is True assert isinstance(base_json_conv(numpy.int64(1)), int) is True assert isinstance(base_json_conv(set([1])), list) is True assert isinstance(base_json_conv(Decimal('1.0')), float) is True assert isinstance(base_json_conv(uuid.uuid4()), str) is True