DBIx::C...::Cursor(3)

okay so this is DBIx::C...::Cursor(3) β€” from the User Contributed Perl Documentation β€” and we're about to make a query cursor make sense. no cap. πŸ’…

🌸 NAME 🌸

DBIx::Class::Storage::DBI::Cursor β€” the object representing a query cursor on a resultset. literally the cursor object for a DBIx::Class::ResultSet. πŸ¦‹

✨ SYNOPSIS ✨

bestie, here's the little demo:

  my $cursor = $schema->resultset('CD')->cursor();

  # raw values off the database handle in resultset columns/select order
  my @next_cd_column_values = $cursor->next;

  # list of all raw values as arrayrefs
  my @all_cds_column_values = $cursor->all;

πŸ’– DESCRIPTION πŸ’–

A Cursor represents a query cursor on a DBIx::Class::ResultSet object. It allows for traversing the result set with next, retrieving all results with all and resetting the cursor with reset. it's giving cursor main character energy, fr fr. ✨

Usually, you would use the cursor methods built into DBIx::Class::ResultSet to traverse it. See next in DBIx::Class::ResultSet, reset in DBIx::Class::ResultSet and all in DBIx::Class::ResultSet for more information. iykyk. 🫢

πŸŽ€ METHODS πŸŽ€

πŸ’« new

Returns a new DBIx::Class::Storage::DBI::Cursor object. fresh cursor, new vibe. πŸ’…

⭐ next

  • Arguments: none
  • Return Value: \@row_columns

Advances the cursor to the next row and returns an array of column values (the result of fetchrow_array in DBI method). no cap. 🌟

πŸ“ all

  • Arguments: none
  • Return Value: \@row_columns+

Returns a list of arrayrefs of column values for all rows in the DBIx::Class::ResultSet. all the rows, all the arrayrefs, all the slay. 🫢

🌈 reset

Resets the cursor to the beginning of the DBIx::Class::ResultSet. rewind time, cursor edition. βͺ

🧚 FURTHER QUESTIONS? 🧚

Check the list of additional DBIC resources. that's the whole instruction, bestie. πŸŽ€

This module is free software copyright by the DBIx::Class (DBIC) authors. You can redistribute it and/or modify it under the same terms as the DBIx::Class library.


okay bye bestie 🫢 this was DBIx::C...::Cursor(3) β€” page says perl v5.42.0, dated 2025-01-22. mwah πŸ’‹

πŸ“¦ where this page comes from