Lines Matching defs:context_id
73 /// \param context_id The identifier of the context.
79 get_env_vars(sqlite::database& db, const int64_t context_id)
85 "WHERE context_id == :context_id");
86 stmt.bind(":context_id", context_id);
245 /// \param context_id The identifier of the context.
250 put_env_vars(sqlite::database& db, const int64_t context_id,
254 "INSERT INTO env_vars (context_id, var_name, var_value) "
255 "VALUES (:context_id, :var_name, :var_value)");
256 stmt.bind(":context_id", context_id);
658 "SELECT context_id FROM actions WHERE action_id == :action_id");
665 get_context(stmt.safe_column_int64("context_id")));
701 "SELECT action_id, context_id FROM actions WHERE "
708 stmt.safe_column_int64("context_id"));
720 /// \param context_id The identifier of the context to retrieve.
726 store::transaction::get_context(const int64_t context_id)
730 "SELECT cwd FROM contexts WHERE context_id == :context_id");
731 stmt.bind(":context_id", context_id);
734 context_id);
737 get_env_vars(_pimpl->_db, context_id));
739 throw error(F("Error loading context %s: %s") % context_id % e.what());
751 /// \param context_id The identifier for the action's context.
758 const int64_t context_id)
762 "INSERT INTO actions (context_id) VALUES (:context_id)");
763 stmt.bind(":context_id", context_id);
792 const int64_t context_id = _pimpl->_db.last_insert_rowid();
794 put_env_vars(_pimpl->_db, context_id, context.env());
796 return context_id;