Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement Request: Update CI_DB and CI_DB_query_builder for DataTables Support #33

Open
vipulmangukiya opened this issue Sep 10, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@vipulmangukiya
Copy link

vipulmangukiya commented Sep 10, 2024

Describe the bug
Following code required to add into CI_DB and CI_DB_query_builder

Expected behavior, and steps to reproduce if appropriate
I'm requesting an update to the CI_DB and CI_DB_query_builder classes to enhance their functionality for better integration with DataTables. Currently, the methods for limit and escape_like_str need improvements to support complex queries often required when using DataTables.

Describe the solution you'd like
I'd like to propose adding or updating the following code within the CI_DB and CI_DB_query_builder classes:

Updates to CI_DB.php

public function limit($value, $offset = 0)
{
    is_null($value) OR $this->qb_limit = (int) $value;
    empty($offset) OR $this->qb_offset = (int) $offset;

    return $this;
}

public function escape_like_str($str)
{
    return $this->escape_str($str, TRUE);
}

protected function escape_str($str)
{
    return str_replace("'", "''", remove_invisible_characters($str, FALSE));
}

Updates to CI_DB_query_builder.php

/**
 * QB LIMIT data
 *
 * @var int
 */
private $qb_limit = FALSE;

/**
 * QB OFFSET data
 *
 * @var int
 */
private $qb_offset = FALSE;
@vipulmangukiya vipulmangukiya added the bug Something isn't working label Sep 10, 2024
@kenjis kenjis added enhancement New feature or request and removed bug Something isn't working labels Sep 12, 2024
@vipulmangukiya
Copy link
Author

vipulmangukiya commented Sep 12, 2024

Here's a more refined version of your request to propose adding enhancements on GitHub for missing database functions like having to improve DataTables compatibility:


Request for Enhancement: Full Database Functionality Support, including having()

Hi,

I've been using this package to bridge CI3 and CI4 functionalities, but I noticed that certain database functions, such as having(), are not fully implemented. These missing functions are critical for properly functioning DataTables and other complex queries.

Could you add support for the following database functions to improve compatibility with DataTables and other advanced querying features?

  • having()
  • Other missing DB methods (e.g., simple_query, query caching)

This enhancement will greatly help migrate larger applications that depend on CI3's DB features, ensuring a smoother transition to CI4 without losing key functionality.

Thank you for your great work!


Feel free to adapt this text when submitting your request on GitHub!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants