1. /**
  2. * Injects collection parameters for development.
  3. */
  4. function injectCollectionParams() {
  5. // Example collection 1 parameters
  6. const collection1Params = {
  7. name: "users",
  8. description: "Stores user data",
  9. primaryKey: "id",
  10. fields: ["id", "name", "email", "created_at"],
  11. exampleData: [{ id: 1, name: "John Doe", email: "john.doe@example.com" }]
  12. };
  13. // Example collection 2 parameters
  14. const collection2Params = {
  15. name: "products",
  16. description: "Stores product information",
  17. primaryKey: "product_id",
  18. fields: ["product_id", "name", "price", "description"],
  19. exampleData: [{ product_id: "A123", name: "Laptop", price: 1200, description: "High-performance laptop" }]
  20. };
  21. // Inject parameters (example - could be adapted to inject into a data structure)
  22. window.collection1 = collection1Params;
  23. window.collection2 = collection2Params;
  24. console.log("Collection parameters injected for development.");
  25. }
  26. // Call the function to inject parameters.
  27. injectCollectionParams();

Add your comment