MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _pickle_row_data

Method _pickle_row_data

test/sql/test_resultset.py:488–509  ·  view source on GitHub ↗
(self, connection, use_labels)

Source from the content-addressed store, hash-verified

486 not_in(sql.column("content_type"), row._mapping)
487
488 def _pickle_row_data(self, connection, use_labels):
489 users = self.tables.users
490
491 connection.execute(
492 users.insert(),
493 [
494 {"user_id": 7, "user_name": "jack"},
495 {"user_id": 8, "user_name": "ed"},
496 {"user_id": 9, "user_name": "fred"},
497 ],
498 )
499
500 result = connection.execute(
501 users.select()
502 .order_by(users.c.user_id)
503 .set_label_style(
504 LABEL_STYLE_TABLENAME_PLUS_COL
505 if use_labels
506 else LABEL_STYLE_NONE
507 )
508 ).all()
509 return result
510
511 @testing.variation("use_pickle", [True, False])
512 @testing.variation("use_labels", [True, False])

Callers 2

test_pickled_rowsMethod · 0.95

Calls 6

executeMethod · 0.45
insertMethod · 0.45
allMethod · 0.45
set_label_styleMethod · 0.45
order_byMethod · 0.45
selectMethod · 0.45

Tested by

no test coverage detected