Skip to main content
swetar
August 21, 2024
Question

Internal working to write to data store

  • August 21, 2024
  • 2 replies
  • 0 views

How exactly does a write to data store work in the background?

- For a single row, it will surely run 1 insert query, what happens when the data is an array? for each row will it run a single query or multiple ones?

    2 replies

    August 21, 2024

    AFAIK, it uses insert query with ON DUPLICATE KEY UPDATE. See below sample:

    INSERT INTO player (name, age)
    VALUES
    ('Sachin', 42),
    ('Dhone', 40),
    ('Virat', 30)
    ON DUPLICATE KEY UPDATE
    age = VALUES(age)

    Syntex may vary based on the Database and its versions.

    karumurua531442
    August 22, 2024

    AFAIK, Appian sends the SQL queries generated by the ORM ( object relation mapping) to the database through the database connection pool. (INSERT, UPDATE, DELETE) queries.