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

Why GroceryCrud lib supports only MySQL databases? #168

Open
davidoster opened this issue Feb 12, 2013 · 8 comments
Open

Why GroceryCrud lib supports only MySQL databases? #168

davidoster opened this issue Feb 12, 2013 · 8 comments

Comments

@davidoster
Copy link

On the documentation of Grocery Crud library it has a section about known issues[http://www.grocerycrud.com/documentation/known-issues] where it states that :
"Only works with MYSQL and MYSQLi database."

Is this outdated? And if it isn't why is that?

Thank you!

@scoumbourdis
Copy link
Owner

Hello@davidoster,

Unfortunately it is not out of date. Well the basic reason is that active record was not able to handle some custom complicated queries that I have in grocery CRUD. They were lot of bugs at active record at that time, that actually was a stopper rather that make my life easier. So it was a decision that I had to made in order to complete grocery CRUD. Of course anyone can create his own model easily as it is organized to be only in one file. If you go to: application/models/grocery_crud_model.php you can see that not many hard coded queries are there.

You can also create your own model easily and without changing the core functionality of grocery CRUD. You can see some examples at: http://www.grocerycrud.com/forums/topic/90-how-to-create-an-extension-for-grocery-crud-real-example-included/ and http://www.grocerycrud.com/documentation/options_functions/set_model

Good news:

  • They are lot of contributions for different databases as it is only one model actually to change and the model doesn't change so often
  • I will try to focus to this big feature after the big release of grocery CRUD (1.4) . So probably this will be our new big features that I will add. Not promises though as I don't know if I will focus on grocery CRUD 2 or I will go for this feature :)

Kindest Regards
Johnny

@davidoster
Copy link
Author

John, forgive me if this is a silly question but as I posted here, http://www.grocerycrud.com/forums/topic/1345-grocerycrud-with-oracle/#entry5655

if all the calls you do within the gc model use CI's database function $this->db->some_function then how come the generated queries are not supported for all the different databases that CI supports?

E.g. even the complicated https://github.com/scoumbourdis/grocery-crud/blob/master/application/models/grocery_crud_model.php#L130

ends up being used within this https://github.com/scoumbourdis/grocery-crud/blob/master/application/models/grocery_crud_model.php#L186

If you were doing some weird magic using your own connection(not via CI's db class) I could have understanded it!

@scoumbourdis
Copy link
Owner

Actually this is a very good question and indeed with a very good point.

Everything that you said it is absolutely right. There is not any magic with my own connection or any weird hardcoded thing anywhere. The only problem was that I didn't have the time to actually see all the contributions and try to merge them into one.

So I think that I will not have any problem to implement all the databases that Codeigntier supports. The only thing that I need is... time! The last period I really didn't have enough time with my full time job and I now want to release the new version with multiple grids in one page , how cool is that :) ? . The contributions are great and I don't thing that I will have any problem with that. I have contributions for MSSQL, Oracle and postgresql. It is really just the model that I have to configure and lot of time to test everything.

I hope I covered your questions and I think that is a good question for googling and pointing here :)

I will leave this issue as open so I will update the comments with any news.

@davidoster
Copy link
Author

Thanks John for the answer. That covers the whole thing!
I am keeping a close eye on the multiple grid stuff... I know how much much much difficult that is!
If you ask me, multigrids are more essential at the moment!!!

And some wishes and support in the Greek language since I am Greek too! ;-)
Άμα θέλεις βοήθεια σε κάτι, ενημέρωσε. Εγώ βοηθάω όσο μπορώ με τα forums και γνωρίστηκα ήδη με τον Βίκτορ.
Θεωρώ τη δουλειά σου κορυφαία. Από τη μέρα που ανακάλυψα αυτή τη βιβλιοθήκη (μαζί και το Image CRUD) κατάλαβα ότι έχω κάνει σωστή επιλογή σε MVC framework.
Keep up the work work!!!

@egyware
Copy link

egyware commented Oct 3, 2013

I'm actually work with GroceryCrud and SQL Server, but I made multiples modifications to codeigniter core and GroceryCRUD and works fine.

Note: My english is bad :C

@kvkvkv
Copy link

kvkvkv commented Nov 6, 2013

Hi egyware, Can you tell the steps to acheive this?..

@egyware
Copy link

egyware commented Nov 6, 2013

First you have to change the codeigniter core. SQL Server does not support keyword LIMIT and no detect primary keys.
Second fix some SQL Scripts in GroceryCRUD. SQL Server don't use ´ character for table names and "Show Columns" query doesn't exists (find alternative).
Third fix some data types, I had many problems with "datetime" with GroceryCRUD.
Etc.. etc..
I think it's better upload the modified files.

@ghost
Copy link

ghost commented Jan 5, 2016

Hi Egyware, can you please post the updated files of G crud for MS Sql support.

Thanks in Advance

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

No branches or pull requests

4 participants