MCPcopy Index your code
hub / github.com/piccolo-orm/piccolo / select

Method select

piccolo/table.py:1116–1142  ·  view source on GitHub ↗

Get data in the form of a list of dictionaries, with each dictionary representing a row. These are all equivalent: .. code-block:: python await Band.select().columns(Band.name) await Band.select(Band.name) await Band.select('nam

(
        cls, *columns: Union[Selectable, str], exclude_secrets=False
    )

Source from the content-addressed store, hash-verified

1114
1115 @classmethod
1116 def select(
1117 cls, *columns: Union[Selectable, str], exclude_secrets=False
1118 ) -> Select:
1119 """
1120 Get data in the form of a list of dictionaries, with each dictionary
1121 representing a row.
1122
1123 These are all equivalent:
1124
1125 .. code-block:: python
1126
1127 await Band.select().columns(Band.name)
1128 await Band.select(Band.name)
1129 await Band.select('name')
1130
1131 :param exclude_secrets:
1132 If ``True``, any columns with ``secret=True`` are omitted from the
1133 response. For example, we use this for the password column of
1134 :class:`BaseUser <piccolo.apps.user.tables.BaseUser>`. Even though
1135 the passwords are hashed, you still don&#x27;t want them being passed
1136 over the network if avoidable.
1137
1138 """
1139 _columns = cls._process_column_args(*columns)
1140 return Select(
1141 table=cls, columns_list=_columns, exclude_secrets=exclude_secrets
1142 )
1143
1144 @classmethod
1145 def delete(cls, force=False) -> Delete:

Callers 15

loginMethod · 0.80
get_usersFunction · 0.80
get_dumpFunction · 0.80
_splice_m2m_rowsMethod · 0.80
runMethod · 0.80
runMethod · 0.80
default_querystringsMethod · 0.80
runMethod · 0.80
run_queriesFunction · 0.80

Calls 2

SelectClass · 0.90
_process_column_argsMethod · 0.80

Tested by 15

test_hash_updateMethod · 0.64
test_migration_tableMethod · 0.64
test_cleanMethod · 0.64
test_forwards_fakeMethod · 0.64
_run_comparisonMethod · 0.64
run_nestedMethod · 0.64
test_extra_nodesMethod · 0.64
test_transactionMethod · 0.64
test_atomicMethod · 0.64
test_savepointMethod · 0.64
test_named_savepointMethod · 0.64