question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Programmatic definition of data sets

See original GitHub issue

Is it possible to programmatic define data sets?

Something like in jdbdt http://jdbdt.org/DataSets.html

DataSet data = 
   builder(t)
  .sequence("ID", 1) // 1, 2, 3, ...
  .sequence("LOGIN", "harry", "mark", "john")
  .sequence("NAME", "Harry H", "Mark M", "John J")
  .sequence("PASSWORD", i -> "password " + i , 1)
  .random("CREATED", Date.valueOf("2015-01-01"), Date.valueOf("2015-12-31"))
  .generate(3) // generate 3 rows 
  .sequence("LOGIN", i -> "guest_" + i, 4)  // "user_4", "user_5", ...
  .sequence("NAME", i -> "Guest User " + i, 4) // "Guest User 4", ...
  .value("password", "samePasswordForAllGuests") 
  .generate(6) // 6 more rows keeping ID sequence and CREATED random filler
  .data();   

This will improve refactoring in case of database schema changes, also generation can be simplified.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:71 (45 by maintainers)

github_iconTop GitHub Comments

1reaction
rmpestanocommented, May 16, 2019

Hey folks, anything else we should consider before merging the PR?

I would like to thank you for all the ideias and your time discussing the DataSetBuilder API and reviewing the PR in details.

On the first moment I don’t even consider It would be a good ideia to add such builder but now, thanks to you all, I’m not just certain but am sure that the DataSetBuilder can bring a lot more users to our API, so again thank you very much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Programmatic Data to Optimize Search | Power Digital
Programmatic is the ultimate way to arrange mass amounts of data into audiences that are meaningful to your brand or business.
Read more >
Programmatic Definition & Meaning - Dictionary.com
of, relating to, or employing a computer program: The coders found a programmatic solution to automate data processing.
Read more >
3 Session 3: Programmatic metadata and data access
It is written in XML, which consists of a series of nested elements. The element definitions, required elements, and structure are all defined...
Read more >
DataSets, DataTables, and DataViews - ADO.NET
Programmatically create a DataTable, DataRelation, and Constraint within a DataSet and populate the tables with data. Populate the DataSet with ...
Read more >
1-programmatic-data-analyses - UofT Coders
Spreadsheet software is great for viewing and entering small data sets, and for quickly creating simple visualizations. However, it can be tricky to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found