MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / on_conflict_do_nothing

Method on_conflict_do_nothing

lib/sqlalchemy/dialects/sqlite/dml.py:165–184  ·  view source on GitHub ↗

Specifies a DO NOTHING action for ON CONFLICT clause. :param index_elements: A sequence consisting of string column names, :class:`_schema.Column` objects, or other column expression objects that will be used to infer a target index or unique constraint.

(
        self,
        index_elements: _OnConflictIndexElementsT = None,
        index_where: _OnConflictIndexWhereT = None,
    )

Source from the content-addressed store, hash-verified

163
164 @_on_conflict_exclusive
165 def on_conflict_do_nothing(
166 self,
167 index_elements: _OnConflictIndexElementsT = None,
168 index_where: _OnConflictIndexWhereT = None,
169 ) -> Self:
170 """
171 Specifies a DO NOTHING action for ON CONFLICT clause.
172
173 :param index_elements:
174 A sequence consisting of string column names, :class:`_schema.Column`
175 objects, or other column expression objects that will be used
176 to infer a target index or unique constraint.
177
178 :param index_where:
179 Additional WHERE criterion that can be used to infer a
180 conditional target index.
181
182 """
183
184 return self.ext(OnConflictDoNothing(index_elements, index_where))
185
186
187class OnConflictClause(SyntaxExtension, ClauseElement):

Callers 15

_upsertFunction · 0.45
test_insert_on_conflictFunction · 0.45
sqlite_stuff.pyFile · 0.45
stmt1Method · 0.45
stmt2Method · 0.45
stmt21Method · 0.45
stmt22Method · 0.45
stmt23Method · 0.45
stmt24Method · 0.45

Calls 2

OnConflictDoNothingClass · 0.70
extMethod · 0.45

Tested by 15

test_insert_on_conflictFunction · 0.36
stmt1Method · 0.36
stmt2Method · 0.36
stmt21Method · 0.36
stmt22Method · 0.36
stmt23Method · 0.36
stmt24Method · 0.36