Skip to content

Define set() only for Table and Column#15

Merged
kou merged 1 commit into
groonga:mainfrom
abetomo:improve-set
Jun 30, 2026
Merged

Define set() only for Table and Column#15
kou merged 1 commit into
groonga:mainfrom
abetomo:improve-set

Conversation

@abetomo

@abetomo abetomo commented Jun 30, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 30, 2026 02:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR narrows the public set() API so it’s only exposed on Table/table subclasses and Column/column subclasses, while moving the shared implementation into an internal Object._set_value() helper.

Changes:

  • Removed Object.set() as a public method and introduced internal Object._set_value() for shared value-setting logic.
  • Added set() wrappers to Table and Column that delegate to _set_value().
  • Added a new test case exercising set() on an Array table.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
testing/test_table.py Adds a new test for calling set() on a table (Array).
grnpy/table.pyx Adds Table.set() delegating to internal _set_value().
grnpy/object.pyx Converts set() into internal cdef _set_value() implementation.
grnpy/object.pxd Exposes _set_value() for cross-module Cython calls and imports grn_id.
grnpy/column.pyx Adds Column.set() delegating to internal _set_value().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread testing/test_table.py
Comment on lines +49 to +56
def test_set(tmpdir):
db_path = tmpdir.join('db')
with grnpy.Database.create(db_path):
users = grnpy.Array.create('Users', value_type='Int32')
id = users.add()
users.set(id, 29)

# todo: Add a test for the set value
@kou
kou merged commit 0dff04c into groonga:main Jun 30, 2026
5 checks passed
@abetomo
abetomo deleted the improve-set branch June 30, 2026 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants