Coder Social home page Coder Social logo

Comments (3)

autophagy avatar autophagy commented on September 2, 2024

Hi @nook24,

I don't believe this is actually possible in the current crate-dbal - we use the underlying DBAL library to get table details:

https://github.com/doctrine/dbal/blob/4c03ed81471c62f178581eb325339a3c34f3b71a/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php#L270

Here, when getting table information, it only retrieves columns, indexes and foreign keys - no options. I'll look into extending to this, to see if we can retrieve the options of a table alongside the other information.

from crate-dbal.

autophagy avatar autophagy commented on September 2, 2024

Hi @nook24 - I've just released version 2.3.0 of the DBAL driver, which contains a feature to retrieve CrateDB specific table options when you retrieve tables from createSchema(). So your above code would result in something like this:

Array
(
    [create_options] => Array
        (
        )

    [sharding_routing_column] => id
    [sharding_num_shards] => 6
    [partition_columns] => Array
        (
            [0] => parted
            [1] => date
        )

    [table_options] => Array
        (
            [codec] => default
            [routing.allocation.include] => 
            [routing.allocation.require] => 
            [routing.allocation.exclude] => 
            [routing.allocation.enable] => all
            [routing.allocation.total_shards_per_node] => -1
            [mapping.total_fields.limit] => 1000
            [refresh_interval] => 1000
            [translog.flush_threshold_size] => 536870912
            [translog.sync_interval] => 5000
            [translog.durability] => REQUEST
            [blocks.metadata] => 
            [blocks.read] => 
            [blocks.read_only] => 
            [blocks.write] => 
            [merge.scheduler.max_thread_count] => 
            [merge.scheduler.max_merge_count] => 
            [store.type] => fs
            [unassigned.node_left.delayed_timeout] => 60000
            [write.wait_for_active_shards] => ALL
            [warmer.enabled] => 1
            [number_of_replicas] => 0-2
            [column_policy] => strict
        )

)

I'll close this issue now, as I believe it is now resolved. But if you encounter further issues, please don't hesitate to reopen it. 🚀

Thanks again for reporting this!

from crate-dbal.

nook24 avatar nook24 commented on September 2, 2024

Works as expected, many thanks :)

from crate-dbal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.