# Path: django_cassandra_engine/compat.py



import inspect
from django.conf import settings
from django.db import DEFAULT_DB_ALIAS
from .compat import cqlengine
    from django.apps import apps
    from .models import DjangoCassandraModel
    from django.db import connections
    from django.db import connections

    def executemany(self, sql, param_list):
        with self.db.wrap_database_errors:
            return self.cursor.executemany(sql, param_list)


def get_installed_apps():
    """Return list of all installed apps"""

    return [
        a.models_module for a in apps.get_app_configs() if a.models_module is not None
    ]


def get_cql_models(app, connection=None, keyspace=None):
    """
    :param app: django models module
    :param connection: connection name
    :param keyspace: keyspace
    :return: list of all cassandra.cqlengine.Model within app that should be
    synced to keyspace.
    """

    models = []
    single_cassandra_connection = len(list(get_cassandra_connections())) == 1
    is_default_connection = (
        connection == DEFAULT_DB_ALIAS or single_cassandra_connection
    )

    for name, obj in inspect.getmembers(app):

# Path: django_cassandra_engine/compat.py



# Path: django_cassandra_engine/utils.py
import inspect
from django.conf import settings
from django.db import DEFAULT_DB_ALIAS
from .compat import cqlengine
    from django.apps import apps
    from .models import DjangoCassandraModel
    from django.db import connections
    from django.db import connections


    def executemany(self, sql, param_list):
        with self.db.wrap_database_errors:
            return self.cursor.executemany(sql, param_list)


def get_installed_apps():
    """Return list of all installed apps"""

    return [
        a.models_module for a in apps.get_app_configs() if a.models_module is not None
    ]


def get_cql_models(app, connection=None, keyspace=None):
    """
    :param app: django models module
    :param connection: connection name
    :param keyspace: keyspace
    :return: list of all cassandra.cqlengine.Model within app that should be
    synced to keyspace.
    """

    models = []
    single_cassandra_connection = len(list(get_cassandra_connections())) == 1
    is_default_connection = (
        connection == DEFAULT_DB_ALIAS or single_cassandra_connection
    )

    for name, obj in inspect.getmembers(app):

        cql_model_types = (cqlengine.models.Model, DjangoCassandraModel)