Welcome Guest, Not a member yet? Register   Sign In
[Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition)

[eluser]OverZealous[/eluser]
@bEz:
Well, that makes some sense. When it is an option, I usually prefer to (gasp!) duplicate information on multiple tables, just to make queries more efficient.

For me, it's rare that that causes problems. Obviously, every system is different and has different needs! Tongue

I look forward to your input.

[eluser]ntheorist[/eluser]
I had thought about creating a datamap-specific view functionality. The idea i guess would be to set a base path for your model views (ie 'views/datamaps/' or just 'datamaps/' ), and then create a function such as $this->view($viewname, $buffer). The view could be located in views/datamaps/{tablename}/{viewname} or something. The idea is it would automatically supply the view file with its data (or the object itself) and maybe also some meta data (model name, labels etc) in a standard way. This way you can create generic views that contain logic based on an easy to understand folder structure. This probably only saves a few lines of code in the controller, but multiplied several times over many controllers it may be helpful. Plus you have a point to change view loading/structure mechanisms at a later stage.

another loading extension could be something like $this->view_all($view, $buffer), which does the same but iterates over the all array. Maybe for that one you could add a callback function as a third parameter which could provide further validation, trigger auth switches or send special data to each view.

anyway i might try to write up a DMZ extension (atm i simply use a base extend) and if there's interest i can post what i come up with

thx

n

[eluser]OverZealous[/eluser]
Post Removed: 1.4.0 was released

[eluser]bEz[/eluser]
@phil re: 1.4.0-beta11
Missing Primary Key definition for the following table in Example Module (MySQL folder)
Code:
CREATE TABLE `statuses` (
    `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    `name` character varying(40) NOT NULL,
    `closed` smallint DEFAULT 0 NOT NULL,
    `sortorder` BIGINT UNSIGNED DEFAULT 0 NOT NULL,
        PRIMARY Key (`id`),
    UNIQUE INDEX name (`name` ASC)
) ENGINE = InnoDB

[eluser]OverZealous[/eluser]
Oops. The MySQL code was converted from PostGreSQL manually. I figured I'd miss something like that.

I overwrote DMZ_1.4.0-beta1 ZIP on the server. Hopefully it will work OK now.

[eluser]mrtavo[/eluser]
I have another question. (which I think the answer is no)

Is there any way to use multiple databases with DMZ ?
It is possible to use DMZ with one DB and a normal connection with another ?

The issue is that I have a mysql DB that is mine, but i need to access another DB that is out of my control; so I have only "select" permissions. I would like to use DMZ in my DB, but keep on using the CI->DB object with the other.

I finally change to mysql, I still have problems with sqlite and canĀ“t solve the problem. Anyway mysql works fine and I'll keep on using it.

[eluser]OverZealous[/eluser]
Yes, you can, very simply!

The DataMapper database needs to be the default in CodeIgniter. Then, whenever you need the second DB, use the instructions provided in the CodeIgniter manual. (Scroll down to Connecting to Multiple Databases.)

You can then use DataMapper like normal, and SELECT on your other DB using traditional CodeIgniter methods (include ActiveRecord).

[eluser]mrtavo[/eluser]
[quote author="OverZealous.com" date="1248264869"]Yes, you can, very simply!

The DataMapper database needs to be the default in CodeIgniter. Then, whenever you need the second DB, use the instructions provided in the CodeIgniter manual. (Scroll down to Connecting to Multiple Databases.)

You can then use DataMapper like normal, and SELECT on your other DB using traditional CodeIgniter methods (include ActiveRecord).[/quote]


Thanks very much for the quick reply Big Grin I will try that soon.

[eluser]OverZealous[/eluser]
Post Removed: 1.4.0 was released

[eluser]OverZealous[/eluser]
@bEz
With the new deep queries and deep includes, you might not need views at all! I did some research and found out that using views does not improve performance in most cases.

Since what you needed was the ability to query deeper, this might solve your problems!

Good luck!




Theme © iAndrew 2016 - Forum software by © MyBB